xunge/DecIR huggingface dataset:
void msm_otg_put_transceiver(struct msm_otg_transceiver *xceiv) {}


x86 assembly (clang, -O0):
<msm_otg_put_transceiver>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<msm_otg_put_transceiver>:
ret

LLVM IR (-O0):
%struct.msm_otg_transceiver = type opaque
define void @msm_otg_put_transceiver(%struct.msm_otg_transceiver* %0) {
%2 = alloca %struct.msm_otg_transceiver*
store %struct.msm_otg_transceiver* %0, %struct.msm_otg_transceiver** %2
ret void
}

LLVM IR (-O2):
%struct.msm_otg_transceiver = type opaque
define void @msm_otg_put_transceiver(%struct.msm_otg_transceiver* nocapture %0) {
ret void
}
/* Variables and functions */
unsigned char CountBitsInByte(unsigned char);
unsigned char CountBitsInCode(unsigned char *code) {
  return CountBitsInByte(code[0]) + CountBitsInByte(code[1]) +
         CountBitsInByte(code[2]);
}


x86 assembly (clang, -O0):
<CountBitsInCode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edi
call   1030 <CountBitsInByte@plt>
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%edi
call   1030 <CountBitsInByte@plt>
mov    %al,%cl
mov    -0x10(%rbp),%eax
movzbl %cl,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%edi
call   1030 <CountBitsInByte@plt>
mov    %al,%cl
mov    -0xc(%rbp),%eax
movzbl %cl,%ecx
add    %ecx,%eax
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CountBitsInCode>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbp
movzbl (%rdi),%edi
call   1030 <CountBitsInByte@plt>
mov    %eax,%r14d
movzbl 0x1(%rbp),%edi
call   1030 <CountBitsInByte@plt>
mov    %eax,%ebx
add    %r14b,%bl
movzbl 0x2(%rbp),%edi
call   1030 <CountBitsInByte@plt>
add    %bl,%al
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define zeroext i8 @CountBitsInCode(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = call zeroext i8 @CountBitsInByte(i8 zeroext %5)
%7 = zext i8 %6 to i32
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = call zeroext i8 @CountBitsInByte(i8 zeroext %10)
%12 = zext i8 %11 to i32
%13 = add nsw i32 %7, %12
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 2
%16 = load i8, i8* %15
%17 = call zeroext i8 @CountBitsInByte(i8 zeroext %16)
%18 = zext i8 %17 to i32
%19 = add nsw i32 %13, %18
%20 = trunc i32 %19 to i8
ret i8 %20
}

LLVM IR (-O2):
define zeroext i8 @CountBitsInCode(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call zeroext i8 @CountBitsInByte(i8 zeroext %2)
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = tail call zeroext i8 @CountBitsInByte(i8 zeroext %5)
%7 = add i8 %6, %3
%8 = getelementptr inbounds i8, i8* %0, i64 2
%9 = load i8, i8* %8
%10 = tail call zeroext i8 @CountBitsInByte(i8 zeroext %9)
%11 = add i8 %7, %10
ret i8 %11
}
/* Variables and functions */
bool SHAREMIND_MAP_KEY_LESS_int(int const k1, int const k2) { return k1 < k2; }


x86 assembly (clang, -O0):
<SHAREMIND_MAP_KEY_LESS_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_MAP_KEY_LESS_int>:
xor    %eax,%eax
cmp    %esi,%edi
setl   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_MAP_KEY_LESS_int(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp slt i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_LESS_int(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void unused_parm(int a) { (a); }


x86 assembly (clang, -O0):
<unused_parm>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<unused_parm>:
ret

LLVM IR (-O0):
define void @unused_parm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
ret void
}

LLVM IR (-O2):
define void @unused_parm(i32 %0) {
ret void
}
int check_for_running_daemons(int minor) { return 0; }


x86 assembly (clang, -O0):
<check_for_running_daemons>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_for_running_daemons>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @check_for_running_daemons(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @check_for_running_daemons(i32 %0) {
ret i32 0
}
int go() { return 42; }


x86 assembly (clang, -O0):
<go>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2a,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<go>:
mov    $0x2a,%eax
ret

LLVM IR (-O0):
define i32 @go() {
ret i32 42
}

LLVM IR (-O2):
define i32 @go() {
ret i32 42
}
/* Variables and functions */
int /*<<< orphan*/ ASL8(int /*<<< orphan*/);
int /*<<< orphan*/ DirectIndexedXE1(int);
void Op16E1(void) { ASL8(DirectIndexedXE1(3)); }


x86 assembly (clang, -O0):
<Op16E1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1040 <DirectIndexedXE1@plt>
mov    %eax,%edi
call   1030 <ASL8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op16E1>:
push   %rax
mov    $0x3,%edi
call   1040 <DirectIndexedXE1@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <ASL8@plt>

LLVM IR (-O0):
define void @Op16E1() {
%1 = call i32 @DirectIndexedXE1(i32 3)
%2 = call i32 @ASL8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Op16E1() {
%1 = tail call i32 @DirectIndexedXE1(i32 3)
%2 = tail call i32 @ASL8(i32 %1)
ret void
}
int sum3(int a, int b, int c) {
  int sum = 0;
  sum = a + b + c;
  return sum;
}


x86 assembly (clang, -O0):
<sum3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum3>:
lea    (%rdi,%rsi,1),%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @sum3(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = add nsw i32 %8, %9
%11 = load i32, i32* %6
%12 = add nsw i32 %10, %11
store i32 %12, i32* %7
%13 = load i32, i32* %7
ret i32 %13
}

LLVM IR (-O2):
define i32 @sum3(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = add nsw i32 %4, %2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void version() {
  fprintf(stderr, "version: %s\n", "undefined");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
lea    0xed2(%rip),%rdx
call   1030 <fprintf@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<version>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
lea    0xed5(%rip),%rdx
call   1030 <fprintf@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [13 x i8] c"version: %s\0A\00"
@.str.1 = [10 x i8] c"undefined\00"
@EXIT_SUCCESS = global i32 0
define void @version() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [13 x i8] c"version: %s\0A\00"
@.str.1 = [10 x i8] c"undefined\00"
@EXIT_SUCCESS = global i32 0
define void @version() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
void g(void) {
  int a;
  f(a);
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    -0x4(%rbp),%edi
call   1030 <f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
jmp    1030 <f@plt>

LLVM IR (-O0):
define void @g() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = call i32 @f(i32 %2)
ret void
}

LLVM IR (-O2):
define void @g() {
%1 = tail call i32 @f(i32 undef)
ret void
}
/* Type definitions */
struct buffer {
  int dummy;
};

/* Variables and functions */
struct buffer *buffer_do_new(void *, size_t);
void *malloc(size_t);
struct buffer *buffer_new(size_t capacity) {
  struct buffer *self;
  void *data;
  data = malloc(capacity);
  if (!data)
    return NULL;
  self = buffer_do_new(data, capacity);
  return self;
}


x86 assembly (clang, -O0):
<buffer_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1151 <buffer_new+0x31>
movq   $0x0,-0x8(%rbp)
jmp    116a <buffer_new+0x4a>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <buffer_do_new@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buffer_new>:
push   %rbx
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     113a <buffer_new+0x1a>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <buffer_do_new@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.buffer = type { i32 }
define %struct.buffer* @buffer_new(i64 %0) {
%2 = alloca %struct.buffer*
%3 = alloca i64
%4 = alloca %struct.buffer*
%5 = alloca i8*
store i64 %0, i64* %3
%6 = load i64, i64* %3
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = icmp ne i8* %8, null
br i1 %9, label %11, label %10
10: ; preds = %1
store %struct.buffer* null, %struct.buffer** %2
br label %16
11: ; preds = %1
%12 = load i8*, i8** %5
%13 = load i64, i64* %3
%14 = call %struct.buffer* @buffer_do_new(i8* %12, i64 %13)
store %struct.buffer* %14, %struct.buffer** %4
%15 = load %struct.buffer*, %struct.buffer** %4
store %struct.buffer* %15, %struct.buffer** %2
br label %16
16: ; preds = %11, %10
%17 = load %struct.buffer*, %struct.buffer** %2
ret %struct.buffer* %17
}

LLVM IR (-O2):
%struct.buffer = type { i32 }
define %struct.buffer* @buffer_new(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call %struct.buffer* @buffer_do_new(i8* %2, i64 %0)
br label %6
6: ; preds = %1, %4
%7 = phi %struct.buffer* [ %5, %4 ], [ null, %1 ]
ret %struct.buffer* %7
}
void func_sprintf(char *str, char *format, ...) {}


x86 assembly (clang, -O0):
<func_sprintf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_sprintf>:
ret

LLVM IR (-O0):
define void @func_sprintf(i8* %0, i8* %1, ...) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @func_sprintf(i8* nocapture %0, i8* nocapture %1, ...) {
ret void
}
void RTUtf16ToLower(void) {}


x86 assembly (clang, -O0):
<RTUtf16ToLower>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTUtf16ToLower>:
ret

LLVM IR (-O0):
define void @RTUtf16ToLower() {
ret void
}

LLVM IR (-O2):
define void @RTUtf16ToLower() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MRF24J40_send(char *, int, unsigned short);
void MRF24J40_send_byte(char data, unsigned short adres) {
  MRF24J40_send(&data, 1, adres);
}


x86 assembly (clang, -O0):
<MRF24J40_send_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
lea    -0x1(%rbp),%rdi
mov    $0x1,%esi
movzwl -0x4(%rbp),%edx
call   1030 <MRF24J40_send@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MRF24J40_send_byte>:
push   %rax
mov    %esi,%edx
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
call   1030 <MRF24J40_send@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @MRF24J40_send_byte(i8 signext %0, i16 zeroext %1) {
%3 = alloca i8
%4 = alloca i16
store i8 %0, i8* %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = call i32 @MRF24J40_send(i8* %3, i32 1, i16 zeroext %5)
ret void
}

LLVM IR (-O2):
define void @MRF24J40_send_byte(i8 signext %0, i16 zeroext %1) {
%3 = alloca i8
store i8 %0, i8* %3
%4 = call i32 @MRF24J40_send(i8* %3, i32 1, i16 zeroext %1)
ret void
}
void delay(void) {
  volatile int count = 1000 * 200;
  while (count--)
    ;
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
movl   $0x30d40,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     1124 <delay+0x24>
jmp    110b <delay+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
movl   $0x30d40,-0x4(%rsp)
nopl   0x0(%rax,%rax,1)
subl   $0x1,-0x4(%rsp)
jae    1110 <delay+0x10>
ret

LLVM IR (-O0):
define void @delay() {
%1 = alloca i32
store volatile i32 200000, i32* %1
br label %2
2: ; preds = %6, %0
%3 = load volatile i32, i32* %1
%4 = add nsw i32 %3, -1
store volatile i32 %4, i32* %1
%5 = icmp ne i32 %3, 0
br i1 %5, label %6, label %7
6: ; preds = %2
br label %2
7: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @delay() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store volatile i32 200000, i32* %1
br label %3
3: ; preds = %3, %0
%4 = load volatile i32, i32* %1
%5 = add nsw i32 %4, -1
store volatile i32 %5, i32* %1
%6 = icmp eq i32 %4, 0
br i1 %6, label %7, label %3
7: ; preds = %3
ret void
}
void rsn_preauth_deinit(struct wpa_sm *sm) {}


x86 assembly (clang, -O0):
<rsn_preauth_deinit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rsn_preauth_deinit>:
ret

LLVM IR (-O0):
%struct.wpa_sm = type opaque
define void @rsn_preauth_deinit(%struct.wpa_sm* %0) {
%2 = alloca %struct.wpa_sm*
store %struct.wpa_sm* %0, %struct.wpa_sm** %2
ret void
}

LLVM IR (-O2):
%struct.wpa_sm = type opaque
define void @rsn_preauth_deinit(%struct.wpa_sm* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int CleanupIoctlInterface(int fd) { close(fd); }


x86 assembly (clang, -O0):
<CleanupIoctlInterface>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CleanupIoctlInterface>:
jmp    1030 <close@plt>

LLVM IR (-O0):
define i32 @CleanupIoctlInterface(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 @close(i32 %4)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @CleanupIoctlInterface(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 undef
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t LongSwap(uint32_t l) {
  l = ((l >> 8) & 0x00ff00ff) | ((l << 8) & 0xff00ff00);
  l = (l >> 16) | (l << 16);
  return l;
}


x86 assembly (clang, -O0):
<LongSwap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xff00ff,%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
and    $0xff00ff00,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
mov    -0x4(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LongSwap>:
bswap  %edi
ror    $0x10,%edi
mov    %edi,%eax
sar    $0x10,%eax
shl    $0x10,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @LongSwap(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 8
%5 = and i32 %4, 16711935
%6 = load i32, i32* %2
%7 = shl i32 %6, 8
%8 = and i32 %7, -16711936
%9 = or i32 %5, %8
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = ashr i32 %10, 16
%12 = load i32, i32* %2
%13 = shl i32 %12, 16
%14 = or i32 %11, %13
store i32 %14, i32* %2
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @LongSwap(i32 %0) {
%2 = lshr i32 %0, 8
%3 = and i32 %2, 16711935
%4 = shl i32 %0, 8
%5 = and i32 %4, -16711936
%6 = or i32 %3, %5
%7 = ashr i32 %6, 16
%8 = shl i32 %6, 16
%9 = or i32 %7, %8
ret i32 %9
}
/* Variables and functions */
scalar_t__ isspace(char);
char toupper(char);
void toupperString(char *s) {
  for (; ((*s != 0) || isspace(*s)); s++)
    *s = toupper(*s);
  return;
}


x86 assembly (clang, -O0):
<toupperString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jne    1157 <toupperString+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1167 <toupperString+0x47>
jmp    118c <toupperString+0x6c>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <toupperString+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupperString>:
push   %rbx
mov    %rdi,%rbx
jmp    113e <toupperString+0x1e>
cs nopw 0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <toupper@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
movzbl (%rbx),%eax
test   %al,%al
jne    1130 <toupperString+0x10>
xor    %edi,%edi
call   1040 <isspace@plt>
test   %rax,%rax
je     1156 <toupperString+0x36>
movzbl (%rbx),%eax
jmp    1130 <toupperString+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @toupperString(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %20, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i64 @isspace(i8 signext %10)
%12 = icmp ne i64 %11, 0
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ true, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %23
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = load i8, i8* %16
%18 = call signext i8 @toupper(i8 signext %17)
%19 = load i8*, i8** %2
store i8 %18, i8* %19
br label %20
20: ; preds = %15
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %2
br label %3
23: ; preds = %13
ret void
}

LLVM IR (-O2):
define void @toupperString(i8* nocapture %0) {
br label %2
2: ; preds = %11, %1
%3 = phi i8* [ %0, %1 ], [ %14, %11 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %2
%7 = tail call i64 @isspace(i8 signext 0)
%8 = icmp eq i64 %7, 0
br i1 %8, label %15, label %9
9: ; preds = %6
%10 = load i8, i8* %3
br label %11
11: ; preds = %9, %2
%12 = phi i8 [ %10, %9 ], [ %4, %2 ]
%13 = tail call signext i8 @toupper(i8 signext %12)
store i8 %13, i8* %3
%14 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
15: ; preds = %6
ret void
}
/* Type definitions */
struct v4l2_format {
  int dummy;
};
typedef int __u32;

/* Variables and functions */
scalar_t__ V4L2_FIELD_HAS_T_OR_B(int /*<<< orphan*/);
int /*<<< orphan*/ v4l_format_g_field(struct v4l2_format *);
int /*<<< orphan*/ v4l_format_s_height(struct v4l2_format *, int);
void v4l_format_s_frame_height(struct v4l2_format *fmt, __u32 height) {
  if (V4L2_FIELD_HAS_T_OR_B(v4l_format_g_field(fmt)))
    height /= 2;
  v4l_format_s_height(fmt, height);
}


x86 assembly (clang, -O0):
<v4l_format_s_frame_height>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <v4l_format_g_field@plt>
mov    %eax,%edi
call   1030 <V4L2_FIELD_HAS_T_OR_B@plt>
cmp    $0x0,%rax
je     1167 <v4l_format_s_frame_height+0x37>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <v4l_format_s_height@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v4l_format_s_frame_height>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <v4l_format_g_field@plt>
mov    %eax,%edi
call   1030 <V4L2_FIELD_HAS_T_OR_B@plt>
test   %rax,%rax
je     1154 <v4l_format_s_frame_height+0x24>
mov    %ebp,%eax
shr    $0x1f,%eax
add    %ebp,%eax
sar    %eax
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <v4l_format_s_height@plt>

LLVM IR (-O0):
%struct.v4l2_format = type { i32 }
define void @v4l_format_s_frame_height(%struct.v4l2_format* %0, i32 %1) {
%3 = alloca %struct.v4l2_format*
%4 = alloca i32
store %struct.v4l2_format* %0, %struct.v4l2_format** %3
store i32 %1, i32* %4
%5 = load %struct.v4l2_format*, %struct.v4l2_format** %3
%6 = call i32 @v4l_format_g_field(%struct.v4l2_format* %5)
%7 = call i64 @V4L2_FIELD_HAS_T_OR_B(i32 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i32, i32* %4
%11 = sdiv i32 %10, 2
store i32 %11, i32* %4
br label %12
12: ; preds = %9, %2
%13 = load %struct.v4l2_format*, %struct.v4l2_format** %3
%14 = load i32, i32* %4
%15 = call i32 @v4l_format_s_height(%struct.v4l2_format* %13, i32 %14)
ret void
}

LLVM IR (-O2):
%struct.v4l2_format = type { i32 }
define void @v4l_format_s_frame_height(%struct.v4l2_format* %0, i32 %1) {
%3 = tail call i32 @v4l_format_g_field(%struct.v4l2_format* %0)
%4 = tail call i64 @V4L2_FIELD_HAS_T_OR_B(i32 %3)
%5 = icmp eq i64 %4, 0
%6 = sdiv i32 %1, 2
%7 = select i1 %5, i32 %1, i32 %6
%8 = tail call i32 @v4l_format_s_height(%struct.v4l2_format* %0, i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FLEXCOMM6_DriverIRQHandler();
__attribute__((weak)) void FLEXCOMM6_IRQHandler(void) {
  FLEXCOMM6_DriverIRQHandler();
}


x86 assembly (clang, -O0):
<FLEXCOMM6_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <FLEXCOMM6_DriverIRQHandler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FLEXCOMM6_IRQHandler>:
xor    %eax,%eax
jmp    1030 <FLEXCOMM6_DriverIRQHandler@plt>

LLVM IR (-O0):
define weak void @FLEXCOMM6_IRQHandler() {
%1 = call i32 (...) @FLEXCOMM6_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @FLEXCOMM6_IRQHandler() {
%1 = tail call i32 (...) @FLEXCOMM6_DriverIRQHandler()
ret void
}
/* Variables and functions */
int EINVAL;
double strtod(char const *, char **);
int read_double(const char *str, double *val) {
  char *end;
  double value = strtod(str, &end);
  if (end == str)
    return -EINVAL;
  *val = value;
  return 0;
}


x86 assembly (clang, -O0):
<read_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <strtod@plt>
movsd  %xmm0,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1153 <read_double+0x43>
xor    %eax,%eax
mov    0x2e97(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    1167 <read_double+0x57>
movsd  -0x28(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_double>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%rsi
call   1030 <strtod@plt>
cmp    %rbx,(%rsp)
je     1131 <read_double+0x21>
movsd  %xmm0,(%r14)
xor    %eax,%eax
jmp    113c <read_double+0x2c>
mov    0x2ea8(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @read_double(i8* %0, double* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca double*
%6 = alloca i8*
%7 = alloca double
store i8* %0, i8** %4
store double* %1, double** %5
%8 = load i8*, i8** %4
%9 = call double @strtod(i8* %8, i8** %6)
store double %9, double* %7
%10 = load i8*, i8** %6
%11 = load i8*, i8** %4
%12 = icmp eq i8* %10, %11
br i1 %12, label %13, label %16
13: ; preds = %2
%14 = load i32, i32* @EINVAL
%15 = sub nsw i32 0, %14
store i32 %15, i32* %3
br label %19
16: ; preds = %2
%17 = load double, double* %7
%18 = load double*, double** %5
store double %17, double* %18
store i32 0, i32* %3
br label %19
19: ; preds = %16, %13
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @read_double(i8* %0, double* nocapture writeonly %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call double @strtod(i8* %0, i8** %3)
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, %0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* @EINVAL
%10 = sub nsw i32 0, %9
br label %12
11: ; preds = %2
store double %5, double* %1
br label %12
12: ; preds = %11, %8
%13 = phi i32 [ %10, %8 ], [ 0, %11 ]
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ XErrorEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int errorHandler(Display *dpy, XErrorEvent *err) {
  (void)dpy;
  (void)err;
  return 0;
}


x86 assembly (clang, -O0):
<errorHandler>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<errorHandler>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @errorHandler(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = load i32*, i32** %4
ret i32 0
}

LLVM IR (-O2):
define i32 @errorHandler(i32* nocapture readnone %0, i32* nocapture readnone %1) {
ret i32 0
}
int do_585() { return 585; }


x86 assembly (clang, -O0):
<do_585>:
push   %rbp
mov    %rsp,%rbp
mov    $0x249,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_585>:
mov    $0x249,%eax
ret

LLVM IR (-O0):
define i32 @do_585() {
ret i32 585
}

LLVM IR (-O2):
define i32 @do_585() {
ret i32 585
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
void writelines(char *lineptr[], int nlines) {
  int i = 0;
  for (i = 0; i < nlines; i++) {
    printf("%d'th line = %s;\n", i, lineptr[i]);
  }
}


x86 assembly (clang, -O0):
<writelines>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1162 <writelines+0x52>
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112d <writelines+0x1d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writelines>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1147 <writelines+0x37>
mov    %rdi,%r14
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <writelines+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [18 x i8] c"%d'th line = %s;\0A\00"
define void @writelines(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
store i32 0, i32* %5
store i32 0, i32* %5
br label %6
6: ; preds = %18, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %21
10: ; preds = %6
%11 = load i32, i32* %5
%12 = load i8**, i8*** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %12, i64 %14
%16 = load i8*, i8** %15
%17 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %11, i8* %16)
br label %18
18: ; preds = %10
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %6
21: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"%d'th line = %s;\0A\00"
define void @writelines(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
%10 = trunc i64 %7 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %10, i8* %9)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret void
}
/* Variables and functions */
int atoi(char const *);
int OddNumber(const char *id, const char *name, const int purchase) {
  const char *p = name + 4;
  if ((atoi(p) % 2) == 1)
    return purchase;
  return 0;
}


x86 assembly (clang, -O0):
<OddNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <atoi@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    1154 <OddNumber+0x44>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115b <OddNumber+0x4b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OddNumber>:
push   %rbx
mov    %edx,%ebx
lea    0x4(%rsi),%rdi
call   1030 <atoi@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
sub    %ecx,%eax
xor    %ecx,%ecx
cmp    $0x1,%eax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @OddNumber(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%9 = load i8*, i8** %6
%10 = getelementptr inbounds i8, i8* %9, i64 4
store i8* %10, i8** %8
%11 = load i8*, i8** %8
%12 = call i32 @atoi(i8* %11)
%13 = srem i32 %12, 2
%14 = icmp eq i32 %13, 1
br i1 %14, label %15, label %17
15: ; preds = %3
%16 = load i32, i32* %7
store i32 %16, i32* %4
br label %18
17: ; preds = %3
store i32 0, i32* %4
br label %18
18: ; preds = %17, %15
%19 = load i32, i32* %4
ret i32 %19
}

LLVM IR (-O2):
define i32 @OddNumber(i8* nocapture readnone %0, i8* nocapture %1, i32 %2) {
%4 = getelementptr inbounds i8, i8* %1, i64 4
%5 = tail call i32 @atoi(i8* %4)
%6 = srem i32 %5, 2
%7 = icmp eq i32 %6, 1
%8 = select i1 %7, i32 %2, i32 0
ret i32 %8
}
void multiplyWith2(int *a) { *a = *a * 2; }


x86 assembly (clang, -O0):
<multiplyWith2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
shl    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiplyWith2>:
shll   (%rdi)
ret

LLVM IR (-O0):
define void @multiplyWith2(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 2
%6 = load i32*, i32** %2
store i32 %5, i32* %6
ret void
}

LLVM IR (-O2):
define void @multiplyWith2(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl nsw i32 %2, 1
store i32 %3, i32* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int cusp_icmp_send(void *session, char *UDPdata, int UDPdataoff, int UDPdatalen,
                   char *UDPto, int UDPtoport, char *UDPfrom, int UDPfromport,
                   uint16_t ICMPcode) {
  return -1;
}


x86 assembly (clang, -O0):
<cusp_icmp_send>:
push   %rbp
mov    %rsp,%rbp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cusp_icmp_send>:
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @cusp_icmp_send(i8* %0, i8* %1, i32 %2, i32 %3, i8* %4, i32 %5, i8* %6, i32 %7, i32 %8) {
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i32
%16 = alloca i8*
%17 = alloca i32
%18 = alloca i32
store i8* %0, i8** %10
store i8* %1, i8** %11
store i32 %2, i32* %12
store i32 %3, i32* %13
store i8* %4, i8** %14
store i32 %5, i32* %15
store i8* %6, i8** %16
store i32 %7, i32* %17
store i32 %8, i32* %18
ret i32 -1
}

LLVM IR (-O2):
define i32 @cusp_icmp_send(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i32 %3, i8* nocapture readnone %4, i32 %5, i8* nocapture readnone %6, i32 %7, i32 %8) {
ret i32 -1
}
int strcmp(const char *s1, const char *s2) {
  unsigned int i = 0;
  int d;
  while (1) {
    d = (unsigned char)s1[i] - (unsigned char)s2[i];
    if (d != 0 || s1[i] == '\0')
      return d;
    i++;
  }
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%edx
movzbl (%rcx,%rdx,1),%ecx
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    114c <strcmp+0x4c>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1151 <strcmp+0x51>
mov    -0x18(%rbp),%eax
pop    %rbp
ret
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <strcmp+0x13>

x86 assembly (clang, -O2):
<strcmp>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ecx,%eax
movzbl (%rdi,%rax,1),%edx
movzbl (%rsi,%rax,1),%r8d
mov    %edx,%eax
sub    %r8d,%eax
jne    1129 <strcmp+0x29>
add    $0x1,%ecx
test   %dl,%dl
jne    1110 <strcmp+0x10>
ret

LLVM IR (-O0):
define i32 @strcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 0, i32* %5
br label %7
7: ; preds = %2, %33
%8 = load i8*, i8** %3
%9 = load i32, i32* %5
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = load i8*, i8** %4
%15 = load i32, i32* %5
%16 = zext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = sub nsw i32 %13, %19
store i32 %20, i32* %6
%21 = load i32, i32* %6
%22 = icmp ne i32 %21, 0
br i1 %22, label %31, label %23
23: ; preds = %7
%24 = load i8*, i8** %3
%25 = load i32, i32* %5
%26 = zext i32 %25 to i64
%27 = getelementptr inbounds i8, i8* %24, i64 %26
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %23, %7
%32 = load i32, i32* %6
ret i32 %32
33: ; preds = %23
%34 = load i32, i32* %5
%35 = add i32 %34, 1
store i32 %35, i32* %5
br label %7
}

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ 0, %2 ], [ %16, %3 ]
%5 = zext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = getelementptr inbounds i8, i8* %1, i64 %5
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = sub nsw i32 %8, %11
%13 = icmp ne i32 %12, 0
%14 = icmp eq i8 %7, 0
%15 = select i1 %13, i1 true, i1 %14
%16 = add i32 %4, 1
br i1 %15, label %17, label %3
17: ; preds = %3
ret i32 %12
}
void popto() {
  asm volatile("popq %%rax\n\t"
               "movq $0x0123456789abcdef, %%rbx\n\t"
               "movq %%rax, (%%rbx)\n\t" ::
                   :);
}


x86 assembly (clang, -O0):
<popto>:
push   %rbp
mov    %rsp,%rbp
pop    %rax
movabs $0x123456789abcdef,%rbx
45 23 01
mov    %rax,(%rbx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<popto>:
pop    %rax
movabs $0x123456789abcdef,%rbx
45 23 01
mov    %rax,(%rbx)
ret

LLVM IR (-O0):
define void @popto() {
ret void
}

LLVM IR (-O2):
define void @popto() {
tail call void asm sideeffect "popq %rax\0A\09movq $$0x0123456789abcdef, %rbx\0A\09movq %rax, (%rbx)\0A\09", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
double MonteCarlo_num_flops(int Num_samples) {
  return ((double)Num_samples) * 4.0;
}


x86 assembly (clang, -O0):
<MonteCarlo_num_flops>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xeec(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MonteCarlo_num_flops>:
cvtsi2sd %edi,%xmm0
mulsd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @MonteCarlo_num_flops(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = fmul double %4, 4.000000e+00
ret double %5
}

LLVM IR (-O2):
define double @MonteCarlo_num_flops(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fmul double %2, 4.000000e+00
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char, int);
int /*<<< orphan*/ stderr;
void w(int x) { fprintf(stderr, "%c%d\n", 'w', x); }


x86 assembly (clang, -O0):
<w>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%ecx
lea    0xed2(%rip),%rsi
mov    $0x77,%edx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<w>:
mov    %edi,%ecx
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
lea    0xede(%rip),%rsi
mov    $0x77,%edx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [6 x i8] c"%c%d\0A\00"
define void @w(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 signext 119, i32 %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [6 x i8] c"%c%d\0A\00"
define void @w(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 signext 119, i32 %0)
ret void
}
void solo5_abort(void) {
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<solo5_abort>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <solo5_abort+0x9>
jmp    1109 <solo5_abort+0x9>

x86 assembly (clang, -O2):
<solo5_abort>:
jmp    1100 <solo5_abort>

LLVM IR (-O0):
define void @solo5_abort() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
define void @solo5_abort() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ sscanf(char const *, char *, unsigned int *);
unsigned int hex_to_int(const char *str) {
  unsigned int result;
  sscanf(str, "%x", &result);
  return (result);
}


x86 assembly (clang, -O0):
<hex_to_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <sscanf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex_to_int>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1030 <sscanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%x\00"
define i32 @hex_to_int(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @sscanf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
@.str = [3 x i8] c"%x\00"
define i32 @hex_to_int(i8* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
ret i32 %5
}
/* Variables and functions */
double stdc_21E6D304(double);
double ceil(double x) { return stdc_21E6D304(x); }


x86 assembly (clang, -O0):
<ceil>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <stdc_21E6D304@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceil>:
jmp    1030 <stdc_21E6D304@plt>

LLVM IR (-O0):
define double @ceil(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @stdc_21E6D304(double %3)
ret double %4
}

LLVM IR (-O2):
define double @ceil(double %0) {
%2 = tail call double @stdc_21E6D304(double %0)
ret double %2
}
int has_feat_hifi_gssp_record(void) { return 0; }


x86 assembly (clang, -O0):
<has_feat_hifi_gssp_record>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<has_feat_hifi_gssp_record>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @has_feat_hifi_gssp_record() {
ret i32 0
}

LLVM IR (-O2):
define i32 @has_feat_hifi_gssp_record() {
ret i32 0
}
int test_imm_9Duint16_mem(unsigned short *val) {
  return ((*val) & (-0x9D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_9Duint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xffffff63,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_9Duint16_mem>:
movzwl (%rdi),%eax
test   $0xff63,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_9Duint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -157
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_9Duint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -157
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void dlm_destroy_debugfs_root(void) {}


x86 assembly (clang, -O0):
<dlm_destroy_debugfs_root>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dlm_destroy_debugfs_root>:
ret

LLVM IR (-O0):
define void @dlm_destroy_debugfs_root() {
ret void
}

LLVM IR (-O2):
define void @dlm_destroy_debugfs_root() {
ret void
}
/* Variables and functions */
double fabs(scalar_t__);
scalar_t__ log10(double);
int main(int argc, char const *argv[]) {
  if (fabs(log10(1.0) - 0.0) < 0.000001) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xeca(%rip),%xmm0
call   1040 <log10@plt>
cvtsi2sd %rax,%xmm0
xorps  %xmm1,%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1030 <fabs@plt>
movaps %xmm0,%xmm1
movsd  0xe9c(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    117a <main+0x5a>
movl   $0x0,-0x4(%rbp)
jmp    1181 <main+0x61>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
call   1040 <log10@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
cvttsd2si %xmm0,%rdi
call   1030 <fabs@plt>
movsd  0xec0(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setbe  %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i64 @log10(double 1.000000e+00)
%7 = sitofp i64 %6 to double
%8 = fsub double %7, 0.000000e+00
%9 = fptosi double %8 to i64
%10 = call double @fabs(i64 %9)
%11 = fcmp olt double %10, 0x3EB0C6F7A0B5ED8D
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 0, i32* %3
br label %14
13: ; preds = %2
store i32 1, i32* %3
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @log10(double 1.000000e+00)
%4 = sitofp i64 %3 to double
%5 = fptosi double %4 to i64
%6 = tail call double @fabs(i64 %5)
%7 = fcmp uge double %6, 0x3EB0C6F7A0B5ED8D
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ fibonacci(int);
int mem_read(int);
int /*<<< orphan*/ mem_write(int, int /*<<< orphan*/);
int main() {
  int n = mem_read(0x400000F0);
  mem_write(0x400000F0 + 4 * 1, fibonacci(n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x400000f0,%edi
call   1040 <mem_read@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <fibonacci@plt>
mov    %eax,%esi
mov    $0x400000f4,%edi
call   1050 <mem_write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x400000f0,%edi
call   1040 <mem_read@plt>
mov    %eax,%edi
call   1030 <fibonacci@plt>
mov    $0x400000f4,%edi
mov    %eax,%esi
call   1050 <mem_write@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @mem_read(i32 1073742064)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @fibonacci(i32 %4)
%6 = call i32 @mem_write(i32 1073742068, i32 %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @mem_read(i32 1073742064)
%2 = tail call i32 @fibonacci(i32 %1)
%3 = tail call i32 @mem_write(i32 1073742068, i32 %2)
ret i32 0
}
void SSLeay_version(void) {}


x86 assembly (clang, -O0):
<SSLeay_version>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSLeay_version>:
ret

LLVM IR (-O0):
define void @SSLeay_version() {
ret void
}

LLVM IR (-O2):
define void @SSLeay_version() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ insertdb();
int main() { insertdb(); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <insertdb@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <insertdb@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @insertdb()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @insertdb()
ret i32 0
}
/* Variables and functions */
void Default_UARTE0_SPIM0_SPIS0_TWIM0_TWIS0_IRQHandler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<Default_UARTE0_SPIM0_SPIS0_TWIM0_TWIS0_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Default_UARTE0_SPIM0_SPIS0_TWIM0_TWIS0_IRQHandler+0x9>
jmp    1109 <Default_UARTE0_SPIM0_SPIS0_TWIM0_TWIS0_IRQHandler+0x9>

x86 assembly (clang, -O2):
<Default_UARTE0_SPIM0_SPIS0_TWIM0_TWIS0_IRQHandler>:
jmp    1100 <Default_UARTE0_SPIM0_SPIS0_TWIM0_TWIS0_IRQHandler>

LLVM IR (-O0):
define void @Default_UARTE0_SPIM0_SPIS0_TWIM0_TWIS0_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Default_UARTE0_SPIM0_SPIS0_TWIM0_TWIS0_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}