xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
int main() {
  sleep(5);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1030 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @sleep(i32 5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sleep(i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert_false_(char *, int, int /*<<< orphan*/);
void test_false_pass() {
  assert_false_("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/hughbien/assertive/refs/"
                "heads/master/test/pass_test.c",
                9, (0));
}


x86 assembly (clang, -O0):
<test_false_pass>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x9,%esi
xor    %edx,%edx
call   1030 <assert_false_@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_false_pass>:
lea    0xee9(%rip),%rdi
mov    $0x9,%esi
xor    %edx,%edx
jmp    1030 <assert_false_@plt>

LLVM IR (-O0):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hughbien/assertive/refs/heads/master/test/pass_test.c\00"
define void @test_false_pass() {
%1 = call i32 @assert_false_(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 9, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hughbien/assertive/refs/heads/master/test/pass_test.c\00"
define void @test_false_pass() {
%1 = tail call i32 @assert_false_(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 9, i32 0)
ret void
}
long long GetNumStacks() { return 1000000000LL; }


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

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

LLVM IR (-O0):
define i64 @GetNumStacks() {
ret i64 1000000000
}

LLVM IR (-O2):
define i64 @GetNumStacks() {
ret i64 1000000000
}
/* Variables and functions */
int /*<<< orphan*/ print_charsets(int);
void print_builtin_charsets(void) { print_charsets(1); }


x86 assembly (clang, -O0):
<print_builtin_charsets>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <print_charsets@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_builtin_charsets>:
mov    $0x1,%edi
jmp    1030 <print_charsets@plt>

LLVM IR (-O0):
define void @print_builtin_charsets() {
%1 = call i32 @print_charsets(i32 1)
ret void
}

LLVM IR (-O2):
define void @print_builtin_charsets() {
%1 = tail call i32 @print_charsets(i32 1)
ret void
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t PRCMGPTimerClockDivisionGet(void) {
  return ((*((volatile unsigned long *)(0x40082000 + 0x000000CC))));
}


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

x86 assembly (clang, -O2):
<PRCMGPTimerClockDivisionGet>:
mov    0x400820cc,%rax
40
ret

LLVM IR (-O0):
define i64 @PRCMGPTimerClockDivisionGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074274508 to i64*)
ret i64 %1
}

LLVM IR (-O2):
define i64 @PRCMGPTimerClockDivisionGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074274508 to i64*)
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ simple_check(int);
void simple_assertion_failure() {
  int x = 4;
  simple_check(x);
}


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

x86 assembly (clang, -O2):
<simple_assertion_failure>:
mov    $0x4,%edi
jmp    1030 <simple_check@plt>

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

LLVM IR (-O2):
define void @simple_assertion_failure() {
%1 = tail call i32 @simple_check(i32 4)
ret void
}
int strlenChar(const char *z) {
  int n = 0;
  while (*z) {
    if ((0xc0 & *(z++)) != 0x80)
      n++;
  }
  return n;
}


x86 assembly (clang, -O0):
<strlenChar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114c <strlenChar+0x4c>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
and    $0xc0,%eax
cmp    $0x80,%eax
je     1147 <strlenChar+0x47>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlenChar+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlenChar>:
mov    (%rdi),%cl
test   %cl,%cl
je     1129 <strlenChar+0x29>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
and    $0xc0,%cl
xor    %edx,%edx
cmp    $0x80,%cl
setne  %dl
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <strlenChar+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @strlenChar(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %18, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %19
8: ; preds = %4
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
%11 = load i8, i8* %9
%12 = sext i8 %11 to i32
%13 = and i32 192, %12
%14 = icmp ne i32 %13, 128
br i1 %14, label %15, label %18
15: ; preds = %8
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %18
18: ; preds = %15, %8
br label %4
19: ; preds = %4
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @strlenChar(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i32 [ %12, %4 ], [ 0, %1 ]
%7 = phi i8* [ %8, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = and i8 %5, -64
%10 = icmp ne i8 %9, -128
%11 = zext i1 %10 to i32
%12 = add nuw nsw i32 %6, %11
%13 = load i8, i8* %8
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 0, %1 ], [ %12, %4 ]
ret i32 %16
}
void ath79_pci_set_plat_dev_init(int (*func)(struct pci_dev *)) {}


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
define void @ath79_pci_set_plat_dev_init(i32 (%struct.pci_dev*)* nocapture %0) {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
__attribute__((always_, unused)) uint32_t ya_byteswap_u32(uint32_t v) {
  v = (v >> 16) | (v << 16);
  return ((v & 0xFF00FF00) >> 8) | ((v & 0x00FF00FF) << 8);
}


x86 assembly (clang, -O0):
<ya_byteswap_u32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-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
and    $0xff00ff00,%eax
shr    $0x8,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00ff,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @ya_byteswap_u32(i32 %0) {
%2 = ashr i32 %0, 16
%3 = shl i32 %0, 16
%4 = or i32 %2, %3
%5 = lshr i32 %4, 8
%6 = and i32 %5, 16711935
%7 = shl i32 %4, 8
%8 = and i32 %7, -16711936
%9 = or i32 %6, %8
ret i32 %9
}
/* Variables and functions */
int getpid();
int Sys_PID(void) { return getpid(); }


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

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

LLVM IR (-O0):
define i32 @Sys_PID() {
%1 = call i32 (...) @getpid()
ret i32 %1
}

LLVM IR (-O2):
define i32 @Sys_PID() {
%1 = tail call i32 (...) @getpid()
ret i32 %1
}
int __test() {
  char *str = "abc";
  return str[0];
}


x86 assembly (clang, -O0):
<__test>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @__test() {
ret i32 97
}
void ble_evt_hardware_adc_result(
    const struct ble_msg_hardware_adc_result_evt_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.ble_msg_hardware_adc_result_evt_t = type opaque
define void @ble_evt_hardware_adc_result(%struct.ble_msg_hardware_adc_result_evt_t* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ logdata();
int main() { logdata(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @logdata()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exposeEventThread_stop();
int /*<<< orphan*/ fb_uninit();
int /*<<< orphan*/ ts_uninit();
int /*<<< orphan*/ window_close();
void cleanup() {
  exposeEventThread_stop();
  window_close();
  fb_uninit();
  ts_uninit();
}


x86 assembly (clang, -O0):
<cleanup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <exposeEventThread_stop@plt>
mov    $0x0,%al
call   1060 <window_close@plt>
mov    $0x0,%al
call   1040 <fb_uninit@plt>
mov    $0x0,%al
call   1030 <ts_uninit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanup>:
push   %rax
xor    %eax,%eax
call   1050 <exposeEventThread_stop@plt>
xor    %eax,%eax
call   1060 <window_close@plt>
xor    %eax,%eax
call   1040 <fb_uninit@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <ts_uninit@plt>

LLVM IR (-O0):
define void @cleanup() {
%1 = call i32 (...) @exposeEventThread_stop()
%2 = call i32 (...) @window_close()
%3 = call i32 (...) @fb_uninit()
%4 = call i32 (...) @ts_uninit()
ret void
}

LLVM IR (-O2):
define void @cleanup() {
%1 = tail call i32 (...) @exposeEventThread_stop()
%2 = tail call i32 (...) @window_close()
%3 = tail call i32 (...) @fb_uninit()
%4 = tail call i32 (...) @ts_uninit()
ret void
}
/* Variables and functions */
scalar_t__ gethostname(char *, unsigned int);
int /*<<< orphan*/ strcpy(char *, char *);
extern int _sfcbGetResponseHostname(char *httpHost, char **hostname,
                                    unsigned int len) {
  if (gethostname(*hostname, len) != 0) {
    strcpy(*hostname, "localhost");
  }
  return 0;
}


x86 assembly (clang, -O0):
<_sfcbGetResponseHostname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x14(%rbp),%esi
call   1040 <gethostname@plt>
cmp    $0x0,%rax
je     115f <_sfcbGetResponseHostname+0x3f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xea6(%rip),%rsi
call   1030 <strcpy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_sfcbGetResponseHostname>:
push   %rbx
mov    %rsi,%rbx
mov    (%rsi),%rdi
mov    %edx,%esi
call   1040 <gethostname@plt>
test   %rax,%rax
je     1142 <_sfcbGetResponseHostname+0x22>
mov    (%rbx),%rdi
lea    0xec3(%rip),%rsi
call   1030 <strcpy@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"localhost\00"
define i32 @_sfcbGetResponseHostname(i8* %0, i8** %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i32 %2, i32* %6
%7 = load i8**, i8*** %5
%8 = load i8*, i8** %7
%9 = load i32, i32* %6
%10 = call i64 @gethostname(i8* %8, i32 %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %3
%13 = load i8**, i8*** %5
%14 = load i8*, i8** %13
%15 = call i32 @strcpy(i8* %14, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %12, %3
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"localhost\00"
define i32 @_sfcbGetResponseHostname(i8* nocapture readnone %0, i8** nocapture %1, i32 %2) {
%4 = load i8*, i8** %1
%5 = tail call i64 @gethostname(i8* %4, i32 %2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = load i8*, i8** %1
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %7, %3
ret i32 0
}
/* Variables and functions */
scalar_t__ __cmpdf2(float, float);
int __gtdf2(double a1, double a2) { return __cmpdf2((float)a1, (float)a2) > 0; }


x86 assembly (clang, -O0):
<__gtdf2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
movsd  -0x10(%rbp),%xmm1
cvtsd2ss %xmm1,%xmm1
call   1030 <__cmpdf2@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__gtdf2>:
push   %rax
cvtsd2ss %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm1
call   1030 <__cmpdf2@plt>
xor    %ecx,%ecx
test   %rax,%rax
setg   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @__gtdf2(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = fptrunc double %5 to float
%7 = load double, double* %4
%8 = fptrunc double %7 to float
%9 = call i64 @__cmpdf2(float %6, float %8)
%10 = icmp sgt i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @__gtdf2(double %0, double %1) {
%3 = fptrunc double %0 to float
%4 = fptrunc double %1 to float
%5 = tail call i64 @__cmpdf2(float %3, float %4)
%6 = icmp sgt i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usageAndExit(const char *cmd) {
  fprintf(stderr,
          "Usage: %s (-s|-c) /path/to/socket.sock\n"
          "	-s: server mode\n"
          "	-c: client mode (read-only)\n",
          cmd);
  exit(255);
}


x86 assembly (clang, -O0):
<usageAndExit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usageAndExit>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [86 x i8] c"Usage: %s (-s|-c) /path/to/socket.sock\0A\09-s: server mode\0A\09-c: client mode (read-only)\0A\00"
define void @usageAndExit(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 ([86 x i8], [86 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 255)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [86 x i8] c"Usage: %s (-s|-c) /path/to/socket.sock\0A\09-s: server mode\0A\09-c: client mode (read-only)\0A\00"
define void @usageAndExit(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 255)
unreachable
}
int config_CARDREADER_PCSC(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @config_CARDREADER_PCSC() {
ret i32 0
}
int test_imm_14int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x14 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_14int64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0x14,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_14int64_highword_mem>:
testb  $0x14,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_14int64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 20
%7 = icmp ne i64 %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_14int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 85899345920
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int test_imm_EEuint8_reg(unsigned char val) {
  return ((val) & (-0xEE << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_EEuint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, -238
%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_EEuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 18
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
struct node *partition(struct node *data, struct node *HEAD) {}


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

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

LLVM IR (-O0):
%struct.node = type opaque
define %struct.node* @partition(%struct.node* %0, %struct.node* %1) {
%3 = alloca %struct.node*
%4 = alloca %struct.node*
%5 = alloca %struct.node*
store %struct.node* %0, %struct.node** %4
store %struct.node* %1, %struct.node** %5
%6 = load %struct.node*, %struct.node** %3
ret %struct.node* %6
}

LLVM IR (-O2):
%struct.node = type opaque
define noalias %struct.node* @partition(%struct.node* nocapture readnone %0, %struct.node* nocapture readnone %1) {
ret %struct.node* undef
}
/* Variables and functions */
bool nrf52_errata_89(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_89() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ wiringXSPIDataRW(int /*<<< orphan*/, unsigned char *, int);
void setDecimalsSPI(unsigned char decimals) {
  unsigned char spi_data[2] = {0x77, decimals};
  wiringXSPIDataRW(0, spi_data, 2);
}


x86 assembly (clang, -O0):
<setDecimalsSPI>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0x77,-0x3(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x2(%rbp)
lea    -0x3(%rbp),%rsi
xor    %edi,%edi
mov    $0x2,%edx
call   1030 <wiringXSPIDataRW@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setDecimalsSPI>:
push   %rax
movb   $0x77,0x6(%rsp)
mov    %dil,0x7(%rsp)
lea    0x6(%rsp),%rsi
xor    %edi,%edi
mov    $0x2,%edx
call   1030 <wiringXSPIDataRW@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @setDecimalsSPI(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca [2 x i8]
store i8 %0, i8* %2
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
store i8 119, i8* %4
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %2
store i8 %6, i8* %5
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%8 = call i32 @wiringXSPIDataRW(i32 0, i8* %7, i32 2)
ret void
}

LLVM IR (-O2):
define void @setDecimalsSPI(i8 zeroext %0) {
%2 = alloca [2 x i8]
%3 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
store i8 119, i8* %3
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 1
store i8 %0, i8* %4
%5 = call i32 @wiringXSPIDataRW(i32 0, i8* %3, i32 2)
ret void
}
void rop3_124_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  unsigned char stk4;
  stk4 = ~S;
  stk3 = *D | stk4;
  stk2 = T & stk3;
  stk1 = S ^ stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_124_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xe(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xe(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_124_1_0>:
mov    (%rdi),%al
xor    %dl,%al
and    %sil,%al
xor    %dl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_124_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = xor i32 %12, -1
%14 = trunc i32 %13 to i8
store i8 %14, i8* %10
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %10
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %9
%22 = load i8, i8* %6
%23 = zext i8 %22 to i32
%24 = load i8, i8* %9
%25 = zext i8 %24 to i32
%26 = and i32 %23, %25
%27 = trunc i32 %26 to i8
store i8 %27, i8* %8
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = load i8, i8* %8
%31 = zext i8 %30 to i32
%32 = xor i32 %29, %31
%33 = trunc i32 %32 to i8
store i8 %33, i8* %7
%34 = load i8, i8* %7
%35 = zext i8 %34 to i32
%36 = load i8, i8* %5
%37 = zext i8 %36 to i32
%38 = xor i32 %37, -1
%39 = and i32 %35, %38
%40 = load i8*, i8** %4
%41 = load i8, i8* %40
%42 = zext i8 %41 to i32
%43 = load i8, i8* %5
%44 = zext i8 %43 to i32
%45 = and i32 %42, %44
%46 = or i32 %39, %45
%47 = trunc i32 %46 to i8
%48 = load i8*, i8** %4
store i8 %47, i8* %48
ret void
}

LLVM IR (-O2):
define void @rop3_124_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %1, -1
%5 = load i8, i8* %0
%6 = and i8 %5, %1
%7 = and i8 %4, %2
%8 = or i8 %6, %7
store i8 %8, i8* %0
ret void
}
int mystery2(const char *s) {
  int x;
  for (x = 0; *s != '\0'; s++) {
    x++;
  }
  return x;
}


x86 assembly (clang, -O0):
<mystery2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1139 <mystery2+0x39>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <mystery2+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystery2>:
cmpb   $0x0,(%rdi)
je     111c <mystery2+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <mystery2+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @mystery2(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = add nuw nsw i32 %5, 1
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %12
}
/* Type definitions */
struct aufs_nhash {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ kfree(struct aufs_nhash *);
int /*<<< orphan*/ nhash_fin(struct aufs_nhash *);
void nhash_del(struct aufs_nhash *nhash) {
  nhash_fin(nhash);
  kfree(nhash);
}


x86 assembly (clang, -O0):
<nhash_del>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <nhash_fin@plt>
mov    -0x8(%rbp),%rdi
call   1030 <kfree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nhash_del>:
push   %rbx
mov    %rdi,%rbx
call   1040 <nhash_fin@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <kfree@plt>

LLVM IR (-O0):
%struct.aufs_nhash = type { i32 }
define void @nhash_del(%struct.aufs_nhash* %0) {
%2 = alloca %struct.aufs_nhash*
store %struct.aufs_nhash* %0, %struct.aufs_nhash** %2
%3 = load %struct.aufs_nhash*, %struct.aufs_nhash** %2
%4 = call i32 @nhash_fin(%struct.aufs_nhash* %3)
%5 = load %struct.aufs_nhash*, %struct.aufs_nhash** %2
%6 = call i32 @kfree(%struct.aufs_nhash* %5)
ret void
}

LLVM IR (-O2):
%struct.aufs_nhash = type { i32 }
define void @nhash_del(%struct.aufs_nhash* %0) {
%2 = tail call i32 @nhash_fin(%struct.aufs_nhash* %0)
%3 = tail call i32 @kfree(%struct.aufs_nhash* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
void main() {
  int a, b, result;
  printf("Enter 2 integers, a and b, seperated by a comma:\n");
  scanf("%d,%d", &a, &b);
  result = a % b;
  printf("The result is: : %d", result);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
cltd
idivl  (%rsp)
lea    0xea6(%rip),%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [50 x i8] c"Enter 2 integers, a and b, seperated by a comma:\0A\00"
@.str.1 = [6 x i8] c"%d,%d\00"
@.str.2 = [20 x i8] c"The result is: : %d\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = srem i32 %6, %7
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret void
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"%d,%d\00"
@.str.2 = [20 x i8] c"The result is: : %d\00"
@str = [49 x i8] c"Enter 2 integers, a and b, seperated by a comma:\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = srem i32 %7, %8
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void do1(int x) { printf("do1 %d\n", x); }


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

x86 assembly (clang, -O2):
<do1>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"do1 %d\0A\00"
define void @do1(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
int bor_listen(int soc, int max_pending) {
  int r = listen(soc, max_pending);
  if (r < 0)
    bor_perror(__func__);
  return r;
}


x86 assembly (clang, -O0):
<bor_listen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x0,%al
call   1030 <listen@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1156 <bor_listen+0x36>
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1040 <bor_perror@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bor_listen>:
push   %rbx
xor    %eax,%eax
call   1030 <listen@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    113c <bor_listen+0x1c>
lea    0xecb(%rip),%rdi
xor    %eax,%eax
call   1040 <bor_perror@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@__func__.bor_listen = [11 x i8] c"bor_listen\00"
define i32 @bor_listen(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 (i32, i32, ...) bitcast (i32 (...)* @listen to i32 (i32, i32, ...)*)(i32 %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @bor_perror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.bor_listen, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
@__func__.bor_listen = [11 x i8] c"bor_listen\00"
define i32 @bor_listen(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @listen to i32 (i32, i32, ...)*)(i32 %0, i32 %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @bor_perror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.bor_listen, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i32 %3
}
long double test_scalblnl(long double x, int y) {
  return __builtin_scalblnl(x, y);
}


x86 assembly (clang, -O0):
<test_scalblnl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %edi,-0x14(%rbp)
fldt   -0x10(%rbp)
movslq -0x14(%rbp),%rdi
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <scalblnl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_scalblnl>:
movslq %edi,%rdi
jmp    1030 <scalblnl@plt>

LLVM IR (-O0):
define x86_fp80 @test_scalblnl(x86_fp80 %0, i32 %1) {
%3 = alloca x86_fp80
%4 = alloca i32
store x86_fp80 %0, x86_fp80* %3
store i32 %1, i32* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = call x86_fp80 @scalblnl(x86_fp80 %5, i64 %7)
ret x86_fp80 %8
}

LLVM IR (-O2):
define x86_fp80 @test_scalblnl(x86_fp80 %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = tail call x86_fp80 @scalblnl(x86_fp80 %0, i64 %3)
ret x86_fp80 %4
}
int cmpInt(int first, int second) {
  if (first && second) {
    if (first == second) {
      return 0;
    }
    if (first < second) {
      return -1;
    } else {
      return 1;
    }
  }
}


x86 assembly (clang, -O0):
<cmpInt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1155 <cmpInt+0x55>
cmpl   $0x0,-0xc(%rbp)
je     1155 <cmpInt+0x55>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1136 <cmpInt+0x36>
movl   $0x0,-0x4(%rbp)
jmp    1155 <cmpInt+0x55>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    114e <cmpInt+0x4e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1155 <cmpInt+0x55>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmpInt>:
test   %edi,%edi
je     1119 <cmpInt+0x19>
test   %esi,%esi
je     1119 <cmpInt+0x19>
xor    %eax,%eax
cmp    %esi,%edi
je     1119 <cmpInt+0x19>
setge  %al
movzbl %al,%eax
add    %eax,%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @cmpInt(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %22
8: ; preds = %2
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %22
11: ; preds = %8
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = icmp eq i32 %12, %13
br i1 %14, label %15, label %16
15: ; preds = %11
store i32 0, i32* %3
br label %22
16: ; preds = %11
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 -1, i32* %3
br label %22
21: ; preds = %16
store i32 1, i32* %3
br label %22
22: ; preds = %15, %20, %21, %8, %2
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @cmpInt(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 0
%4 = icmp ne i32 %1, 0
%5 = and i1 %3, %4
br i1 %5, label %6, label %11
6: ; preds = %2
%7 = icmp eq i32 %0, %1
br i1 %7, label %11, label %8
8: ; preds = %6
%9 = icmp slt i32 %0, %1
%10 = select i1 %9, i32 -1, i32 1
br label %11
11: ; preds = %8, %6, %2
%12 = phi i32 [ undef, %2 ], [ 0, %6 ], [ %10, %8 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ sendCmd(int, char *, unsigned int, unsigned int);
void sketchPoint(int fd, unsigned int x, unsigned int y) {
  sendCmd(fd, "point %u %u\n", x, y);
}


x86 assembly (clang, -O0):
<sketchPoint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xecf(%rip),%rsi
call   1030 <sendCmd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sketchPoint>:
mov    %edx,%ecx
mov    %esi,%edx
lea    0xee5(%rip),%rsi
jmp    1030 <sendCmd@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"point %u %u\0A\00"
define void @sketchPoint(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @sendCmd(i32 %7, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"point %u %u\0A\00"
define void @sketchPoint(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @sendCmd(i32 %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ XPropertyEvent;
struct TYPE_3__ {
  int /*<<< orphan*/ xproperty;
};
typedef TYPE_1__ XEvent;
typedef int /*<<< orphan*/ Window;

/* Variables and functions */
int /*<<< orphan*/ None;
int /*<<< orphan*/ _get_active_window(int /*<<< orphan*/ *);
int /*<<< orphan*/ kbdd_set_window_layout(int /*<<< orphan*/);
void _on_propertyEvent_ewmh(XEvent *e) {
  ;
  XPropertyEvent *ev = &e->xproperty;
  (void)ev;
  Window w = None;
  _get_active_window(&w);
  kbdd_set_window_layout(w);
  ;
}


x86 assembly (clang, -O0):
<_on_propertyEvent_ewmh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
lea    -0x14(%rbp),%rdi
call   1030 <_get_active_window@plt>
mov    -0x14(%rbp),%edi
call   1040 <kbdd_set_window_layout@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_on_propertyEvent_ewmh>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <_get_active_window@plt>
mov    0x4(%rsp),%edi
call   1040 <kbdd_set_window_layout@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
@None = global i32 0
define void @_on_propertyEvent_ewmh(%struct.TYPE_3__* %0) {
%2 = alloca %struct.TYPE_3__*
%3 = alloca i32*
%4 = alloca i32
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %2
%5 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = load i32, i32* @None
store i32 %8, i32* %4
%9 = call i32 @_get_active_window(i32* %4)
%10 = load i32, i32* %4
%11 = call i32 @kbdd_set_window_layout(i32 %10)
ret void
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
@None = global i32 0
define void @_on_propertyEvent_ewmh(%struct.TYPE_3__* nocapture readnone %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @None
store i32 %4, i32* %2
%5 = call i32 @_get_active_window(i32* %2)
%6 = load i32, i32* %2
%7 = call i32 @kbdd_set_window_layout(i32 %6)
ret void
}
/* Variables and functions */
int comparar(int *, int);
int /*<<< orphan*/ selection_sort(int *, int);
int calcular_puntaje(int *baraja) {
  int p;
  selection_sort(baraja, 5);
  p = comparar(baraja, 5);
  return p;
}


x86 assembly (clang, -O0):
<calcular_puntaje>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x5,%esi
call   1030 <selection_sort@plt>
mov    -0x8(%rbp),%rdi
mov    $0x5,%esi
call   1040 <comparar@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcular_puntaje>:
push   %rbx
mov    %rdi,%rbx
mov    $0x5,%esi
call   1030 <selection_sort@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
pop    %rbx
jmp    1040 <comparar@plt>

LLVM IR (-O0):
define i32 @calcular_puntaje(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @selection_sort(i32* %4, i32 5)
%6 = load i32*, i32** %2
%7 = call i32 @comparar(i32* %6, i32 5)
store i32 %7, i32* %3
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @calcular_puntaje(i32* %0) {
%2 = tail call i32 @selection_sort(i32* %0, i32 5)
%3 = tail call i32 @comparar(i32* %0, i32 5)
ret i32 %3
}
/* Type definitions */
struct fix_group_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ clear_group_node(struct fix_group_node *);
int /*<<< orphan*/ free(struct fix_group_node *);
void free_group_node(struct fix_group_node *pnode) {
  clear_group_node(pnode);
  free(pnode);
}


x86 assembly (clang, -O0):
<free_group_node>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <clear_group_node@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_group_node>:
push   %rbx
mov    %rdi,%rbx
call   1040 <clear_group_node@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.fix_group_node = type { i32 }
define void @free_group_node(%struct.fix_group_node* %0) {
%2 = alloca %struct.fix_group_node*
store %struct.fix_group_node* %0, %struct.fix_group_node** %2
%3 = load %struct.fix_group_node*, %struct.fix_group_node** %2
%4 = call i32 @clear_group_node(%struct.fix_group_node* %3)
%5 = load %struct.fix_group_node*, %struct.fix_group_node** %2
%6 = call i32 @free(%struct.fix_group_node* %5)
ret void
}

LLVM IR (-O2):
%struct.fix_group_node = type { i32 }
define void @free_group_node(%struct.fix_group_node* %0) {
%2 = tail call i32 @clear_group_node(%struct.fix_group_node* %0)
%3 = tail call i32 @free(%struct.fix_group_node* %0)
ret void
}
/* Type definitions */
struct str {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ str_append(struct str *, struct str *);
struct str *str_new();
extern struct str *str_copy(struct str *old) {
  struct str *newstr = str_new();
  str_append(newstr, old);
  return newstr;
}


x86 assembly (clang, -O0):
<str_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <str_new@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <str_append@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_copy>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <str_new@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1040 <str_append@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.str = type { i32 }
define %struct.str* @str_copy(%struct.str* %0) {
%2 = alloca %struct.str*
%3 = alloca %struct.str*
store %struct.str* %0, %struct.str** %2
%4 = call %struct.str* (...) @str_new()
store %struct.str* %4, %struct.str** %3
%5 = load %struct.str*, %struct.str** %3
%6 = load %struct.str*, %struct.str** %2
%7 = call i32 @str_append(%struct.str* %5, %struct.str* %6)
%8 = load %struct.str*, %struct.str** %3
ret %struct.str* %8
}

LLVM IR (-O2):
%struct.str = type { i32 }
define %struct.str* @str_copy(%struct.str* %0) {
%2 = tail call %struct.str* (...) @str_new()
%3 = tail call i32 @str_append(%struct.str* %2, %struct.str* %0)
ret %struct.str* %2
}
void ps_close(void) { ; }


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

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

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

LLVM IR (-O2):
define void @ps_close() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ SIG_UNBLOCK;
int /*<<< orphan*/ block_or_unblock_signal(int /*<<< orphan*/,
                                           int /*<<< orphan*/);
void octave_unblock_interrupt_signal(void) {
  block_or_unblock_signal(SIG_UNBLOCK, SIGINT);
}


x86 assembly (clang, -O0):
<octave_unblock_interrupt_signal>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    0x2ebc(%rip),%rax
mov    (%rax),%esi
call   1030 <block_or_unblock_signal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<octave_unblock_interrupt_signal>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
jmp    1030 <block_or_unblock_signal@plt>

LLVM IR (-O0):
@SIG_UNBLOCK = global i32 0
@SIGINT = global i32 0
define void @octave_unblock_interrupt_signal() {
%1 = load i32, i32* @SIG_UNBLOCK
%2 = load i32, i32* @SIGINT
%3 = call i32 @block_or_unblock_signal(i32 %1, i32 %2)
ret void
}

LLVM IR (-O2):
@SIG_UNBLOCK = global i32 0
@SIGINT = global i32 0
define void @octave_unblock_interrupt_signal() {
%1 = load i32, i32* @SIG_UNBLOCK
%2 = load i32, i32* @SIGINT
%3 = tail call i32 @block_or_unblock_signal(i32 %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ erfc(double);
int /*<<< orphan*/ erfcf(float);
int /*<<< orphan*/ erfcl(long double);
void uninitvar_erfc(void) {
  float f;
  (void)erfcf(f);
  double d;
  (void)erfc(d);
  long double ld;
  (void)erfcl(ld);
}


x86 assembly (clang, -O0):
<uninitvar_erfc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  -0x4(%rbp),%xmm0
call   1040 <erfcf@plt>
movsd  -0x10(%rbp),%xmm0
call   1050 <erfc@plt>
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <erfcl@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_erfc>:
sub    $0x18,%rsp
call   1040 <erfcf@plt>
call   1050 <erfc@plt>
call   1030 <erfcl@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @uninitvar_erfc() {
%1 = alloca float
%2 = alloca double
%3 = alloca x86_fp80
%4 = load float, float* %1
%5 = call i32 @erfcf(float %4)
%6 = load double, double* %2
%7 = call i32 @erfc(double %6)
%8 = load x86_fp80, x86_fp80* %3
%9 = call i32 @erfcl(x86_fp80 %8)
ret void
}

LLVM IR (-O2):
define void @uninitvar_erfc() {
%1 = tail call i32 @erfcf(float undef)
%2 = tail call i32 @erfc(double undef)
%3 = tail call i32 @erfcl(x86_fp80 undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, void *);
void default_getdatastr(void *pdata, char *dataval_strbuff, int strbufflen) {
  snprintf(dataval_strbuff, strbufflen, "%p", pdata);
}


x86 assembly (clang, -O0):
<default_getdatastr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x8(%rbp),%rcx
lea    0xecb(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_getdatastr>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rax
mov    %rsi,%rdi
mov    %edx,%esi
mov    %rax,%rdx
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%p\00"
define void @default_getdatastr(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = load i8*, i8** %4
%10 = call i32 @snprintf(i8* %7, i32 %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%p\00"
define void @default_getdatastr(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @snprintf(i8* %1, i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}