; ModuleID = 'test.c'
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.S2 = type { i8, %struct.S1 }
%struct.S1 = type { [2 x i8], i8, i8 }

define i32 @test(%struct.S2* %s2) nounwind {
entry:
  %s2.addr = alloca %struct.S2*, align 8
  store %struct.S2* %s2, %struct.S2** %s2.addr, align 8
  %0 = load %struct.S2** %s2.addr, align 8
  %s1 = getelementptr inbounds %struct.S2* %0, i32 0, i32 1
  %1 = bitcast %struct.S1* %s1 to i32*
  %2 = load i32* %1, align 4
  %3 = lshr i32 %2, 10
  %bf.clear = and i32 %3, 4095
  ret i32 %bf.clear
}
