xunge/DecIR huggingface dataset:
char test_50_0(char *mem) { return __atomic_fetch_and(mem + 4, 1, 4); }


x86 assembly (clang, -O0):
<test_50_0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0x1,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    %cl,-0xc(%rbp)
mov    0x4(%rax),%al
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%al
mov    -0x18(%rbp),%rcx
mov    -0xc(%rbp),%sil
mov    %al,%dl
and    %sil,%dl
lock cmpxchg %dl,(%rcx)
sete   %cl
mov    %al,-0x19(%rbp)
test   $0x1,%cl
mov    %al,-0xb(%rbp)
jne    1152 <test_50_0+0x52>
jmp    1127 <test_50_0+0x27>
mov    -0x19(%rbp),%al
mov    %al,-0xa(%rbp)
movsbl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_50_0>:
mov    0x4(%rdi),%al
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%ecx
and    $0x1,%cl
lock cmpxchg %cl,0x4(%rdi)
jne    1110 <test_50_0+0x10>
ret

LLVM IR (-O0):
define signext i8 @test_50_0(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i8
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 4
store i8 1, i8* %3
%7 = load i8, i8* %3
%8 = atomicrmw and i8* %6, i8 %7 acq_rel
store i8 %8, i8* %4
%9 = load i8, i8* %4
ret i8 %9
}

LLVM IR (-O2):
define signext i8 @test_50_0(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 4
%3 = atomicrmw and i8* %2, i8 1 acq_rel
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("MBEDTLS_PK_PARSE_C and/or MBEDTLS_PK_WRITE_C and/or MBEDTLS_FS_IO "
         "not defined.\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [80 x i8] c"MBEDTLS_PK_PARSE_C and/or MBEDTLS_PK_WRITE_C and/or MBEDTLS_FS_IO not defined.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [79 x i8] c"MBEDTLS_PK_PARSE_C and/or MBEDTLS_PK_WRITE_C and/or MBEDTLS_FS_IO not defined.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, int);
void main(void) {
  printf(" %d is Integer \n %f is Float \n", 1, 2.0);
  printf(" %d is Integer \n %f is Float", 1.0, 2);
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xeed(%rip),%rdi
movsd  0xedd(%rip),%xmm0
mov    $0x2,%esi
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
movsd  0xec4(%rip),%xmm0
mov    $0x2,%esi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
movsd  0xee0(%rip),%xmm0
mov    $0x2,%esi
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
movsd  0xec7(%rip),%xmm0
mov    $0x2,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [31 x i8] c" %d is Integer \0A %f is Float \0A\00"
@.str.1 = [29 x i8] c" %d is Integer \0A %f is Float\00"
define void @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), double 1.000000e+00, i32 2)
%2 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), double 1.000000e+00, i32 2)
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c" %d is Integer \0A %f is Float \0A\00"
@.str.1 = [29 x i8] c" %d is Integer \0A %f is Float\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), double 1.000000e+00, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), double 1.000000e+00, i32 2)
ret void
}
int syscall2(int eax, int ebx) {
  int result;
  asm("int $0x80" : "=a"(result) : "a"(eax), "b"(ebx));
  return result;
}


x86 assembly (clang, -O0):
<syscall2>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ebx
int    $0x80
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscall2>:
push   %rbx
mov    %esi,%ebx
mov    %edi,%eax
int    $0x80
pop    %rbx
ret

LLVM IR (-O0):
define i32 @syscall2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i32 asm "int $$0x80", "={ax},{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i32 %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @syscall2(i32 %0, i32 %1) {
%3 = tail call i32 asm "int $$0x80", "={ax},{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i32 %0, i32 %1)
ret i32 %3
}
void angine_init() {}


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

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

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

LLVM IR (-O2):
define void @angine_init() {
ret void
}
char *list_open(int type) {
  switch (type) {
  case 7:
    return "(";
  case 14:
    return "[";
  case 15:
    return "{";
  }
  return "";
}


x86 assembly (clang, -O0):
<list_open>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x7,%eax
je     113d <list_open+0x3d>
jmp    111b <list_open+0x1b>
mov    -0x10(%rbp),%eax
sub    $0xe,%eax
je     114d <list_open+0x4d>
jmp    112c <list_open+0x2c>
mov    -0x10(%rbp),%eax
sub    $0xf,%eax
je     115d <list_open+0x5d>
jmp    116d <list_open+0x6d>
lea    0xebc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1178 <list_open+0x78>
lea    0xeae(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1178 <list_open+0x78>
lea    0xea0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1178 <list_open+0x78>
lea    0xe8d(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_open>:
cmp    $0x7,%edi
je     1117 <list_open+0x17>
cmp    $0xf,%edi
je     111f <list_open+0x1f>
cmp    $0xe,%edi
jne    1127 <list_open+0x27>
lea    0xeec(%rip),%rax
ret
lea    0xee2(%rip),%rax
ret
lea    0xede(%rip),%rax
ret
lea    0xed3(%rip),%rax
ret

LLVM IR (-O0):
@.str = [2 x i8] c"(\00"
@.str.1 = [2 x i8] c"[\00"
@.str.2 = [2 x i8] c"{\00"
@.str.3 = [1 x i8] zeroinitializer
define i8* @list_open(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 7, label %5
i32 14, label %6
i32 15, label %7
]
5: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %2
br label %9
6: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %9
7: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %9
8: ; preds = %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %9
9: ; preds = %8, %7, %6, %5
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
@.str = [2 x i8] c"(\00"
@.str.1 = [2 x i8] c"[\00"
@.str.2 = [2 x i8] c"{\00"
@.str.3 = [1 x i8] zeroinitializer
define i8* @list_open(i32 %0) {
switch i32 %0, label %4 [
i32 7, label %5
i32 14, label %2
i32 15, label %3
]
2: ; preds = %1
br label %5
3: ; preds = %1
br label %5
4: ; preds = %1
br label %5
5: ; preds = %1, %4, %3, %2
%6 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %6
}
/* Variables and functions */
int ec_receive_processdata_group(int /*<<< orphan*/, int);
int ec_receive_processdata(int timeout) {
  return ec_receive_processdata_group(0, timeout);
}


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

x86 assembly (clang, -O2):
<ec_receive_processdata>:
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <ec_receive_processdata_group@plt>

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

LLVM IR (-O2):
define i32 @ec_receive_processdata(i32 %0) {
%2 = tail call i32 @ec_receive_processdata_group(i32 0, i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
void I2SIntClear(unsigned long ulBase, unsigned long ulIntFlags) {
  DEBUG_ASSERT(ulBase == 0x40054000);
  DEBUG_ASSERT((ulIntFlags & (0x00000020 | 0x00000010 | 0x00000002 |
                              0x00000001)) == ulIntFlags);
  (*((volatile unsigned long *)(ulBase + 0x00000C1C))) = ulIntFlags;
}


x86 assembly (clang, -O0):
<I2SIntClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x40054000,-0x8(%rbp)
40
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rax
and    $0x33,%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0xc1c(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2SIntClear>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
cmp    $0x40054000,%rbx
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
xor    %edi,%edi
test   $0xffffffffffffffcc,%r14
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
mov    %r14,0xc1c(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @I2SIntClear(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, 1074085888
%7 = zext i1 %6 to i32
%8 = call i32 @DEBUG_ASSERT(i32 %7)
%9 = load i64, i64* %4
%10 = and i64 %9, 51
%11 = load i64, i64* %4
%12 = icmp eq i64 %10, %11
%13 = zext i1 %12 to i32
%14 = call i32 @DEBUG_ASSERT(i32 %13)
%15 = load i64, i64* %4
%16 = load i64, i64* %3
%17 = add i64 %16, 3100
%18 = inttoptr i64 %17 to i64*
store volatile i64 %15, i64* %18
ret void
}

LLVM IR (-O2):
define void @I2SIntClear(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 1074085888
%4 = zext i1 %3 to i32
%5 = tail call i32 @DEBUG_ASSERT(i32 %4)
%6 = and i64 %1, 51
%7 = icmp eq i64 %6, %1
%8 = zext i1 %7 to i32
%9 = tail call i32 @DEBUG_ASSERT(i32 %8)
%10 = add i64 %0, 3100
%11 = inttoptr i64 %10 to i64*
store volatile i64 %1, i64* %11
ret void
}
char _Locale_int_frac_digits(struct _Locale_monetary *lmon
                             __attribute__((__unused__))) {
  return 0;
}


x86 assembly (clang, -O0):
<_Locale_int_frac_digits>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
movsbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct._Locale_monetary = type opaque
define signext i8 @_Locale_int_frac_digits(%struct._Locale_monetary* %0) {
%2 = alloca %struct._Locale_monetary*
store %struct._Locale_monetary* %0, %struct._Locale_monetary** %2
ret i8 0
}

LLVM IR (-O2):
%struct._Locale_monetary = type opaque
define signext i8 @_Locale_int_frac_digits(%struct._Locale_monetary* nocapture readnone %0) {
ret i8 0
}
void pcp_print_net_tcp_stats(struct activity *a, int curr) {}


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

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

LLVM IR (-O0):
%struct.activity = type opaque
define void @pcp_print_net_tcp_stats(%struct.activity* %0, i32 %1) {
%3 = alloca %struct.activity*
%4 = alloca i32
store %struct.activity* %0, %struct.activity** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.activity = type opaque
define void @pcp_print_net_tcp_stats(%struct.activity* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ display_put(char *);
extern void display_fini(void) {
  display_put("\033["
              "1"
              ";"
              "999"
              "r"
              "\033["
              "999"
              ";"
              "1"
              "H");
}


x86 assembly (clang, -O0):
<display_fini>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <display_put@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_fini>:
lea    0xee9(%rip),%rdi
jmp    1030 <display_put@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"\1B[1;999r\1B[999;1H\00"
define void @display_fini() {
%1 = call i32 @display_put(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"\1B[1;999r\1B[999;1H\00"
define void @display_fini() {
%1 = tail call i32 @display_put(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ redecl5();
void use131() { redecl5(); }


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

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

LLVM IR (-O0):
define void @use131() {
%1 = call i32 (...) @redecl5()
ret void
}

LLVM IR (-O2):
define void @use131() {
%1 = tail call i32 (...) @redecl5()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
int /*<<< orphan*/ xwrite_in_full(int, char const *, int /*<<< orphan*/);
ssize_t xwrite_str_in_full(int fd, const char *str) {
  return xwrite_in_full(fd, str, strlen(str));
}


x86 assembly (clang, -O0):
<xwrite_str_in_full>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <xwrite_in_full@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xwrite_str_in_full>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <xwrite_in_full@plt>

LLVM IR (-O0):
define i32 @xwrite_str_in_full(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @xwrite_in_full(i32 %5, i8* %6, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @xwrite_str_in_full(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @xwrite_in_full(i32 %0, i8* %1, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ stb__add_alloc(void *, int, char *, int);
void stb_wrapper_malloc(void *p, int sz, char *file, int line) {
  if (!p)
    return;
  stb__add_alloc(p, sz, file, line);
}


x86 assembly (clang, -O0):
<stb_wrapper_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1136 <stb_wrapper_malloc+0x26>
jmp    1149 <stb_wrapper_malloc+0x39>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <stb__add_alloc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stb_wrapper_malloc>:
test   %rdi,%rdi
je     111a <stb_wrapper_malloc+0xa>
jmp    1030 <stb__add_alloc@plt>
ret

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

LLVM IR (-O2):
define void @stb_wrapper_malloc(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = icmp eq i8* %0, null
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call i32 @stb__add_alloc(i8* %0, i32 %1, i8* %2, i32 %3)
br label %8
8: ; preds = %4, %6
ret void
}
unsigned bitcount(unsigned x) {
  int e;
  for (e = 0; x > 0; ++e) {
    x &= x - 1;
  }
  return e;
}


x86 assembly (clang, -O0):
<bitcount>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jbe    1132 <bitcount+0x32>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <bitcount+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitcount>:
xor    %eax,%eax
test   %edi,%edi
je     111c <bitcount+0x1c>
cs nopw 0x0(%rax,%rax,1)
lea    -0x1(%rdi),%ecx
add    $0x1,%eax
and    %edi,%ecx
mov    %ecx,%edi
jne    1110 <bitcount+0x10>
ret

LLVM IR (-O0):
define i32 @bitcount(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i32, i32* %2
%6 = icmp ugt i32 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i32, i32* %2
%9 = sub i32 %8, 1
%10 = load i32, i32* %2
%11 = and i32 %10, %9
store i32 %11, i32* %2
br label %12
12: ; preds = %7
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @bitcount(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add i32 %5, -1
%7 = and i32 %6, %5
%8 = add nuw nsw i32 %4, 1
%9 = icmp eq i32 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void show_usage(char *filename) {
  fprintf(
      stderr,
      "C Binary Object Builder v"
      "0"
      "."
      "1"
      "."
      "1"
      "\n"
      "Copyright 2009 by David Korth.\n\n"
      "This program is licensed under the GNU General Public License v2.\n"
      "See http://www.gnu.org/licenses/gpl-2.0.html for more information.\n\n"
      "Usage: %s input.bin output.c\n"
      "Note: output.h is automatically generated.\n",
      filename);
}


x86 assembly (clang, -O0):
<show_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [270 x i8] c"C Binary Object Builder v0.1.1\0ACopyright 2009 by David Korth.\0A\0AThis program is licensed under the GNU General Public License v2.\0ASee http://www.gnu.org/licenses/gpl-2.0.html for more information.\0A\0AUsage: %s input.bin output.c\0ANote: output.h is automatically generated.\0A\00"
define void @show_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([270 x i8], [270 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [270 x i8] c"C Binary Object Builder v0.1.1\0ACopyright 2009 by David Korth.\0A\0AThis program is licensed under the GNU General Public License v2.\0ASee http://www.gnu.org/licenses/gpl-2.0.html for more information.\0A\0AUsage: %s input.bin output.c\0ANote: output.h is automatically generated.\0A\00"
define void @show_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([270 x i8], [270 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void stop_demo(void) { {}; }


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

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

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

LLVM IR (-O2):
define void @stop_demo() {
ret void
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ pexit(char const *);
void pthread_pexit(int err, const char *fCall) {
  errno = err;
  pexit(fCall);
}


x86 assembly (clang, -O0):
<pthread_pexit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
mov    0x2eb7(%rip),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rdi
call   1030 <pexit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_pexit>:
mov    0x2ec9(%rip),%rax
mov    %edi,(%rax)
mov    %rsi,%rdi
jmp    1030 <pexit@plt>

LLVM IR (-O0):
@errno = global i32 0
define void @pthread_pexit(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
store i32 %5, i32* @errno
%6 = load i8*, i8** %4
%7 = call i32 @pexit(i8* %6)
ret void
}

LLVM IR (-O2):
@errno = global i32 0
define void @pthread_pexit(i32 %0, i8* %1) {
store i32 %0, i32* @errno
%3 = tail call i32 @pexit(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ external_declaration();
int yyselect();
translation_unit() {
  switch (yyselect()) {
  case 1: {
    while (1) {
      switch (yyselect()) {
      case 104: {
        external_declaration();
      } break;
      default:
        goto yy1;
      }
    }
  yy1:;
  } break;
  }
}


x86 assembly (clang, -O0):
<translation_unit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1030 <yyselect@plt>
sub    $0x1,%eax
jne    1172 <translation_unit+0x52>
jmp    113d <translation_unit+0x1d>
jmp    1142 <translation_unit+0x22>
xor    %eax,%eax
call   1030 <yyselect@plt>
sub    $0x68,%eax
jne    1163 <translation_unit+0x43>
jmp    1157 <translation_unit+0x37>
mov    $0x0,%al
call   1040 <external_declaration@plt>
jmp    1168 <translation_unit+0x48>
jmp    116d <translation_unit+0x4d>
jmp    1142 <translation_unit+0x22>
jmp    1172 <translation_unit+0x52>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<translation_unit>:
push   %rax
xor    %eax,%eax
call   1030 <yyselect@plt>
cmp    $0x1,%eax
jne    1145 <translation_unit+0x25>
nopl   (%rax)
xor    %eax,%eax
call   1030 <yyselect@plt>
cmp    $0x68,%eax
jne    1145 <translation_unit+0x25>
xor    %eax,%eax
call   1040 <external_declaration@plt>
jmp    1130 <translation_unit+0x10>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @translation_unit() {
%1 = alloca i32
%2 = call i32 (...) @yyselect()
switch i32 %2, label %11 [
i32 1, label %3
]
3: ; preds = %0
br label %4
4: ; preds = %3, %9
%5 = call i32 (...) @yyselect()
switch i32 %5, label %8 [
i32 104, label %6
]
6: ; preds = %4
%7 = call i32 (...) @external_declaration()
br label %9
8: ; preds = %4
br label %10
9: ; preds = %6
br label %4
10: ; preds = %8
br label %11
11: ; preds = %0, %10
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @translation_unit() {
%1 = tail call i32 (...) @yyselect()
%2 = icmp eq i32 %1, 1
br i1 %2, label %3, label %10
3: ; preds = %0
%4 = tail call i32 (...) @yyselect()
%5 = icmp eq i32 %4, 104
br i1 %5, label %6, label %10
6: ; preds = %3, %6
%7 = tail call i32 (...) @external_declaration()
%8 = tail call i32 (...) @yyselect()
%9 = icmp eq i32 %8, 104
br i1 %9, label %6, label %10
10: ; preds = %6, %3, %0
ret i32 undef
}
char test_63_0(char *mem) { return __atomic_nand_fetch(mem + 4, 1, 4); }


x86 assembly (clang, -O0):
<test_63_0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0x1,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    %cl,-0xc(%rbp)
mov    0x4(%rax),%al
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%al
mov    -0x18(%rbp),%rcx
mov    -0xc(%rbp),%sil
mov    %al,%dl
and    %sil,%dl
mov    %dl,-0x1a(%rbp)
not    %dl
lock cmpxchg %dl,(%rcx)
sete   %cl
mov    %al,-0x19(%rbp)
test   $0x1,%cl
mov    %al,-0xb(%rbp)
jne    1157 <test_63_0+0x57>
jmp    1127 <test_63_0+0x27>
mov    -0xc(%rbp),%cl
mov    -0x19(%rbp),%al
and    %cl,%al
xor    $0xff,%al
mov    %al,-0xa(%rbp)
movsbl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_63_0>:
mov    0x4(%rdi),%al
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%ecx
not    %cl
or     $0xfe,%cl
lock cmpxchg %cl,0x4(%rdi)
jne    1110 <test_63_0+0x10>
not    %al
or     $0xfe,%al
ret

LLVM IR (-O0):
define signext i8 @test_63_0(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i8
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 4
store i8 1, i8* %3
%7 = load i8, i8* %3
%8 = atomicrmw nand i8* %6, i8 %7 acq_rel
%9 = and i8 %8, %7
%10 = xor i8 %9, -1
store i8 %10, i8* %4
%11 = load i8, i8* %4
ret i8 %11
}

LLVM IR (-O2):
define signext i8 @test_63_0(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 4
%3 = atomicrmw nand i8* %2, i8 1 acq_rel
%4 = and i8 %3, 1
%5 = xor i8 %4, -1
ret i8 %5
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
void fprint_xrl_direct(FILE *stream, uint8_t direct) {
  fprintf(stream,
          "XRL   A, "
          "0x%02X"
          "                   ",
          direct);
}


x86 assembly (clang, -O0):
<fprint_xrl_direct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprint_xrl_direct>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"XRL A, 0x%02X \00"
define void @fprint_xrl_direct(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 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"XRL A, 0x%02X \00"
define void @fprint_xrl_direct(i32* nocapture %0, i32 %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ randombytes(unsigned char *, unsigned long long);
void _impl_default_rand_source(void *_, unsigned char *dest,
                               unsigned long long size) {
  randombytes(dest, size);
}


x86 assembly (clang, -O0):
<_impl_default_rand_source>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <randombytes@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_impl_default_rand_source>:
mov    %rsi,%rdi
mov    %rdx,%rsi
jmp    1030 <randombytes@plt>

LLVM IR (-O0):
define void @_impl_default_rand_source(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %5
%8 = load i64, i64* %6
%9 = call i32 @randombytes(i8* %7, i64 %8)
ret void
}

LLVM IR (-O2):
define void @_impl_default_rand_source(i8* nocapture readnone %0, i8* %1, i64 %2) {
%4 = tail call i32 @randombytes(i8* %1, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) { printf("%d\n", sizeof(long *)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 8)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 8)
ret i32 0
}
void pathcon_nm7_incref(void) {}


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

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

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

LLVM IR (-O2):
define void @pathcon_nm7_incref() {
ret void
}
__attribute__((always_)) int mpol_equal(struct mempolicy *a,
                                        struct mempolicy *b) {
  return 1;
}


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

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

LLVM IR (-O0):
%struct.mempolicy = type opaque
define i32 @mpol_equal(%struct.mempolicy* %0, %struct.mempolicy* %1) {
%3 = alloca %struct.mempolicy*
%4 = alloca %struct.mempolicy*
store %struct.mempolicy* %0, %struct.mempolicy** %3
store %struct.mempolicy* %1, %struct.mempolicy** %4
ret i32 1
}

LLVM IR (-O2):
%struct.mempolicy = type opaque
define i32 @mpol_equal(%struct.mempolicy* nocapture readnone %0, %struct.mempolicy* nocapture readnone %1) {
ret i32 1
}
int test_imm_0Aint8_reg(signed char val) {
  return ((val) & (-0x0A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_0Aint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xfffffff6,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_0Aint8_reg>:
test   $0xf6,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_0Aint8_reg(i8 signext %0) {
%2 = and i8 %0, -10
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
scalar_t__ isspace(int);
int is_stopper(int c) { return (isspace(c) || (c == ')') || (c == '(')); }


x86 assembly (clang, -O0):
<is_stopper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isspace@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    114e <is_stopper+0x3e>
mov    $0x1,%al
cmpl   $0x29,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     114e <is_stopper+0x3e>
cmpl   $0x28,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_stopper>:
push   %rbx
mov    %edi,%ebx
call   1030 <isspace@plt>
test   %rax,%rax
setne  %al
and    $0xfffffffe,%ebx
cmp    $0x28,%ebx
sete   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_stopper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isspace(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 41
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 40
br label %12
12: ; preds = %9, %6, %1
%13 = phi i1 [ true, %6 ], [ true, %1 ], [ %11, %9 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @is_stopper(i32 %0) {
%2 = tail call i64 @isspace(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = and i32 %0, -2
%5 = icmp eq i32 %4, 40
%6 = or i1 %5, %3
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ XFontStruct;
struct TYPE_2__ {
  int /*<<< orphan*/ *font;
};
typedef TYPE_1__ XEDataObject;

/* Variables and functions */
void set_XEDataObject_font(void *_p, void *_v) {
  ((XEDataObject *)_p)->font = (XFontStruct *)_v;
}


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

x86 assembly (clang, -O2):
<set_XEDataObject_font>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32* }
define void @set_XEDataObject_font(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to %struct.TYPE_2__*
%9 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %8, i32 0, i32 0
store i32* %6, i32** %9
ret void
}

LLVM IR (-O2):
define void @set_XEDataObject_font(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *strchr(char *, char);
int parse_registers_block(char *buf, int buflen, FILE *f) {
  do {
    if (strchr(buf, '}') != NULL) {
      break;
    }
  } while (fgets(buf, buflen, f) != NULL);
  return 0;
}


x86 assembly (clang, -O0):
<parse_registers_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x7d,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     1150 <parse_registers_block+0x30>
jmp    116f <parse_registers_block+0x4f>
jmp    1155 <parse_registers_block+0x35>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1040 <fgets@plt>
cmp    $0x0,%rax
jne    1133 <parse_registers_block+0x13>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_registers_block>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    $0x7d,%esi
call   1030 <strchr@plt>
test   %rax,%rax
jne    1154 <parse_registers_block+0x34>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
call   1040 <fgets@plt>
test   %rax,%rax
jne    1130 <parse_registers_block+0x10>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @parse_registers_block(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
br label %7
7: ; preds = %13, %3
%8 = load i8*, i8** %4
%9 = call i32* @strchr(i8* %8, i8 signext 125)
%10 = icmp ne i32* %9, null
br i1 %10, label %11, label %12
11: ; preds = %7
br label %19
12: ; preds = %7
br label %13
13: ; preds = %12
%14 = load i8*, i8** %4
%15 = load i32, i32* %5
%16 = load i32*, i32** %6
%17 = call i32* @fgets(i8* %14, i32 %15, i32* %16)
%18 = icmp ne i32* %17, null
br i1 %18, label %7, label %19
19: ; preds = %13, %11
ret i32 0
}

LLVM IR (-O2):
define i32 @parse_registers_block(i8* %0, i32 %1, i32* nocapture %2) {
br label %4
4: ; preds = %7, %3
%5 = tail call i32* @strchr(i8* %0, i8 signext 125)
%6 = icmp eq i32* %5, null
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = tail call i32* @fgets(i8* %0, i32 %1, i32* %2)
%9 = icmp eq i32* %8, null
br i1 %9, label %10, label %4
10: ; preds = %4, %7
ret i32 0
}
_Complex float test_ctanf(_Complex float x) { return __builtin_ctanf(x); }


x86 assembly (clang, -O0):
<test_ctanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movlpd %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
movss  %xmm1,-0x18(%rbp)
movss  %xmm0,-0x14(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <ctanf@plt>
movlpd %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0x4(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ctanf>:
jmp    1030 <ctanf@plt>

LLVM IR (-O0):
define <2 x float> @test_ctanf(<2 x float> %0) {
%2 = alloca { float, float }
%3 = alloca { float, float }
%4 = alloca { float, float }
%5 = alloca { float, float }
%6 = bitcast { float, float }* %3 to <2 x float>*
store <2 x float> %0, <2 x float>* %6
%7 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 0
%8 = load float, float* %7
%9 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 1
%10 = load float, float* %9
%11 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 0
%12 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 1
store float %8, float* %11
store float %10, float* %12
%13 = bitcast { float, float }* %4 to <2 x float>*
%14 = load <2 x float>, <2 x float>* %13
%15 = call <2 x float> @ctanf(<2 x float> %14)
%16 = bitcast { float, float }* %5 to <2 x float>*
store <2 x float> %15, <2 x float>* %16
%17 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 0
%18 = load float, float* %17
%19 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 1
%20 = load float, float* %19
%21 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 0
%22 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 1
store float %18, float* %21
store float %20, float* %22
%23 = bitcast { float, float }* %2 to <2 x float>*
%24 = load <2 x float>, <2 x float>* %23
ret <2 x float> %24
}

LLVM IR (-O2):
define <2 x float> @test_ctanf(<2 x float> %0) {
%2 = tail call <2 x float> @ctanf(<2 x float> %0)
ret <2 x float> %2
}
/* Variables and functions */
unsigned int __mf_watch_or_not(void *, size_t, int /*<<< orphan*/);
unsigned __mf_unwatch(void *ptr, size_t sz) {
  unsigned rc;
  do {
  } while (0);
  rc = __mf_watch_or_not(ptr, sz, 0);
  do {
  } while (0);
  return rc;
}


x86 assembly (clang, -O0):
<__mf_unwatch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
jmp    1125 <__mf_unwatch+0x15>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1030 <__mf_watch_or_not@plt>
mov    %eax,-0x14(%rbp)
jmp    113c <__mf_unwatch+0x2c>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__mf_unwatch>:
xor    %edx,%edx
jmp    1030 <__mf_watch_or_not@plt>

LLVM IR (-O0):
define i32 @__mf_unwatch(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
store i8* %0, i8** %3
store i64 %1, i64* %4
br label %6
6: ; preds = %2
br label %7
7: ; preds = %6
%8 = load i8*, i8** %3
%9 = load i64, i64* %4
%10 = call i32 @__mf_watch_or_not(i8* %8, i64 %9, i32 0)
store i32 %10, i32* %5
br label %11
11: ; preds = %7
br label %12
12: ; preds = %11
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
define i32 @__mf_unwatch(i8* %0, i64 %1) {
%3 = tail call i32 @__mf_watch_or_not(i8* %0, i64 %1, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xe8() {
  Assert_real((isprint(232) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isprint.c",
              1165, ("isprint should be 0 for 0xe8"));
}


x86 assembly (clang, -O0):
<t_isprint_0xe8>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe8,%edi
call   1030 <isprint@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x48d,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0xe8>:
push   %rax
mov    $0xe8,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x48d,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xe8\00"
define void @t_isprint_0xe8() {
%1 = call i64 @isprint(i32 232)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1165, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xe8\00"
define void @t_isprint_0xe8() {
%1 = tail call i64 @isprint(i32 232)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1165, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void foo127(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo127(i32 %0) {
ret void
}
/* Type definitions */
typedef int uint32_t;
struct pcg_state_64 {
  int dummy;
};

/* Variables and functions */
int pcg_unique_64_xsh_rr_32_random_r(struct pcg_state_64 *);
uint32_t pcg_unique_64_xsh_rr_32_boundedrand_r(struct pcg_state_64 *rng,
                                               uint32_t bound) {
  uint32_t threshold = -bound % bound;
  for (;;) {
    uint32_t r = pcg_unique_64_xsh_rr_32_random_r(rng);
    if (r >= threshold)
      return r % bound;
  }
}


x86 assembly (clang, -O0):
<pcg_unique_64_xsh_rr_32_boundedrand_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
sub    -0xc(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pcg_unique_64_xsh_rr_32_random_r@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1152 <pcg_unique_64_xsh_rr_32_boundedrand_r+0x42>
mov    -0x14(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
add    $0x20,%rsp
pop    %rbp
ret
jmp    112b <pcg_unique_64_xsh_rr_32_boundedrand_r+0x1b>

x86 assembly (clang, -O2):
<pcg_unique_64_xsh_rr_32_boundedrand_r>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <pcg_unique_64_xsh_rr_32_random_r@plt>
test   %eax,%eax
js     1120 <pcg_unique_64_xsh_rr_32_boundedrand_r+0x10>
cltd
idiv   %ebp
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.pcg_state_64 = type { i32 }
define i32 @pcg_unique_64_xsh_rr_32_boundedrand_r(%struct.pcg_state_64* %0, i32 %1) {
%3 = alloca %struct.pcg_state_64*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store %struct.pcg_state_64* %0, %struct.pcg_state_64** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sub nsw i32 0, %7
%9 = load i32, i32* %4
%10 = srem i32 %8, %9
store i32 %10, i32* %5
br label %11
11: ; preds = %21, %2
%12 = load %struct.pcg_state_64*, %struct.pcg_state_64** %3
%13 = call i32 @pcg_unique_64_xsh_rr_32_random_r(%struct.pcg_state_64* %12)
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = load i32, i32* %5
%16 = icmp sge i32 %14, %15
br i1 %16, label %17, label %21
17: ; preds = %11
%18 = load i32, i32* %6
%19 = load i32, i32* %4
%20 = srem i32 %18, %19
ret i32 %20
21: ; preds = %11
br label %11
}

LLVM IR (-O2):
%struct.pcg_state_64 = type { i32 }
define i32 @pcg_unique_64_xsh_rr_32_boundedrand_r(%struct.pcg_state_64* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @pcg_unique_64_xsh_rr_32_random_r(%struct.pcg_state_64* %0)
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %3
6: ; preds = %3
%7 = srem i32 %4, %1
ret i32 %7
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void WatchdogResetEnable(uint32_t ui32Base) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000008))) |= 0x00000002;
}


x86 assembly (clang, -O0):
<WatchdogResetEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x8,%eax
cltq
mov    (%rax),%ecx
or     $0x2,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchdogResetEnable>:
movslq %edi,%rax
orl    $0x2,0x8(%rax)
ret

LLVM IR (-O0):
define void @WatchdogResetEnable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 8
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = or i32 %7, 2
store volatile i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
define void @WatchdogResetEnable(i32 %0) {
%2 = add nsw i32 %0, 8
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = or i32 %5, 2
store volatile i32 %6, i32* %4
ret void
}
void OPENSSL_no_config_internal(void) {}


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

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

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

LLVM IR (-O2):
define void @OPENSSL_no_config_internal() {
ret void
}
/* Type definitions */
struct stack_impl {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int stack_impl_ops_is_full(struct stack_impl *stack_impl) {
  printf("stack_impl::is_full()\n");
  return 0;
}


x86 assembly (clang, -O0):
<stack_impl_ops_is_full>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stack_impl_ops_is_full>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stack_impl = type { i32 }
@.str = [23 x i8] c"stack_impl::is_full()\0A\00"
define i32 @stack_impl_ops_is_full(%struct.stack_impl* %0) {
%2 = alloca %struct.stack_impl*
store %struct.stack_impl* %0, %struct.stack_impl** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%struct.stack_impl = type { i32 }
@str = [22 x i8] c"stack_impl::is_full()\00"
define i32 @stack_impl_ops_is_full(%struct.stack_impl* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret i32 0
}