xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
void DEC_HOST_REG_W(int host_reg) {
  addbyte(0x66);
  if (host_reg & 8)
    addbyte(0x41);
  addbyte(0xff);
  addbyte(0xc8 | (host_reg & 7));
}


x86 assembly (clang, -O0):
<DEC_HOST_REG_W>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     113e <DEC_HOST_REG_W+0x2e>
mov    $0x41,%edi
call   1030 <addbyte@plt>
mov    $0xff,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
and    $0x7,%edi
or     $0xc8,%edi
call   1030 <addbyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DEC_HOST_REG_W>:
push   %rbx
mov    %edi,%ebx
mov    $0x66,%edi
call   1030 <addbyte@plt>
test   $0x8,%bl
je     112c <DEC_HOST_REG_W+0x1c>
mov    $0x41,%edi
call   1030 <addbyte@plt>
mov    $0xff,%edi
call   1030 <addbyte@plt>
and    $0x7,%ebx
or     $0xc8,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <addbyte@plt>

LLVM IR (-O0):
define void @DEC_HOST_REG_W(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @addbyte(i32 102)
%4 = load i32, i32* %2
%5 = and i32 %4, 8
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @addbyte(i32 65)
br label %9
9: ; preds = %7, %1
%10 = call i32 @addbyte(i32 255)
%11 = load i32, i32* %2
%12 = and i32 %11, 7
%13 = or i32 200, %12
%14 = call i32 @addbyte(i32 %13)
ret void
}

LLVM IR (-O2):
define void @DEC_HOST_REG_W(i32 %0) {
%2 = tail call i32 @addbyte(i32 102)
%3 = and i32 %0, 8
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @addbyte(i32 65)
br label %7
7: ; preds = %5, %1
%8 = tail call i32 @addbyte(i32 255)
%9 = and i32 %0, 7
%10 = or i32 %9, 200
%11 = tail call i32 @addbyte(i32 %10)
ret void
}
void C_HEAT_Control_Boiler(void) {}


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

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

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

LLVM IR (-O2):
define void @C_HEAT_Control_Boiler() {
ret void
}
/* Variables and functions */
int japi_getmousey(int);
int j_getmousey(int arg0) { return (japi_getmousey(arg0)); }


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

x86 assembly (clang, -O2):
<j_getmousey>:
jmp    1030 <japi_getmousey@plt>

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

LLVM IR (-O2):
define i32 @j_getmousey(i32 %0) {
%2 = tail call i32 @japi_getmousey(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ RDP(char *);
void uc2_dma_io() { RDP("uc2:dma_io\n"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"uc2:dma_io\0A\00"
define void @uc2_dma_io() {
%1 = call i32 @RDP(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"uc2:dma_io\0A\00"
define void @uc2_dma_io() {
%1 = tail call i32 @RDP(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ a2(int *, int, int);
void a1(int a) { a2(&a, a + 4, a + 2); }


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

x86 assembly (clang, -O2):
<a1>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rdi),%esi
lea    0x2(%rdi),%edx
lea    0x4(%rsp),%rdi
call   1030 <a2@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @a1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = add nsw i32 %0, 4
%4 = add nsw i32 %0, 2
%5 = call i32 @a2(i32* %2, i32 %3, i32 %4)
ret void
}
OP(dd, f8) { op_f8(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <op_f8@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_f8()
ret i32 undef
}
void init_cyclone_clock(void) {}


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

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

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

LLVM IR (-O2):
define void @init_cyclone_clock() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf(
      "Name: Jacob Ward\nMajor: Information Systems\nClass: Junior\nAcademic "
      "Interests: Web Development, Networking, Security/Forensics");
}


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

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

LLVM IR (-O0):
@.str = [126 x i8] c"Name: Jacob Ward\0AMajor: Information Systems\0AClass: Junior\0AAcademic Interests: Web Development, Networking, Security/Forensics\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([126 x i8], [126 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [126 x i8] c"Name: Jacob Ward\0AMajor: Information Systems\0AClass: Junior\0AAcademic Interests: Web Development, Networking, Security/Forensics\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([126 x i8], [126 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
void crl_end_screen(void) { endwin(); }


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

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

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

LLVM IR (-O2):
define void @crl_end_screen() {
%1 = tail call i32 (...) @endwin()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_111() {
  Assert_real((isqrt(111) == 10),
              "/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/stdlib/isqrt.c",
              560, ("Integer square root of 111 should be 10"));
}


x86 assembly (clang, -O0):
<t_sqrt_111>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6f,%edi
call   1030 <isqrt@plt>
cmp    $0xa,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x230,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_111>:
push   %rax
mov    $0x6f,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xa,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x230,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 111 should be 10\00"
define void @t_sqrt_111() {
%1 = call i32 @isqrt(i32 111)
%2 = icmp eq i32 %1, 10
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 560, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 111 should be 10\00"
define void @t_sqrt_111() {
%1 = tail call i32 @isqrt(i32 111)
%2 = icmp eq i32 %1, 10
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 560, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int do_256() { return 256; }


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

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

LLVM IR (-O0):
define i32 @do_256() {
ret i32 256
}

LLVM IR (-O2):
define i32 @do_256() {
ret i32 256
}
void ff_hevc_put_hevc_epel_h64_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_h64_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x15() {
  Assert_real((isascii(21)),
              "/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_isascii.c",
              110, ("isascii should be 1 for 0x15"));
}


x86 assembly (clang, -O0):
<t_isascii_0x15>:
push   %rbp
mov    %rsp,%rbp
mov    $0x15,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x6e,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x15>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x6e,%edx
jmp    1030 <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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x15\00"
define void @t_isascii_0x15() {
%1 = call i32 @isascii(i32 21)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 110, 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x15\00"
define void @t_isascii_0x15() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 110, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, int);
void addrcpy(void *dest, const void *src) { memcpy(dest, src, 6); }


x86 assembly (clang, -O0):
<addrcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x6,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addrcpy>:
mov    $0x6,%edx
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @addrcpy(i8* %0, i8* %1) {
%3 = tail call i32 @memcpy(i8* %0, i8* %1, i32 6)
ret void
}
/* Type definitions */
typedef unsigned char uint8_t;

/* Variables and functions */
void swap8(const uint8_t *buffer, void *out) {
  unsigned char *ptr = (unsigned char *)out;
  *ptr = *buffer;
}


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

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

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

LLVM IR (-O2):
define void @swap8(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
store i8 %3, i8* %1
ret void
}
/* Variables and functions */
unsigned long read_video_reg64_low(unsigned long);
int /*<<< orphan*/ write_video_reg64_low(unsigned long, unsigned long);
void Redcloud_fp_reg(int mode, unsigned long address, unsigned long *data) {
  if (mode == 0) {
    *data = read_video_reg64_low(address);
  } else {
    write_video_reg64_low(address, *data);
  }
}


x86 assembly (clang, -O0):
<Redcloud_fp_reg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1155 <Redcloud_fp_reg+0x35>
mov    -0x10(%rbp),%rdi
call   1040 <read_video_reg64_low@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
jmp    1165 <Redcloud_fp_reg+0x45>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rsi
call   1030 <write_video_reg64_low@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Redcloud_fp_reg>:
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%rax
test   %edi,%edi
je     1137 <Redcloud_fp_reg+0x17>
mov    (%rbx),%rsi
mov    %rax,%rdi
pop    %rbx
jmp    1030 <write_video_reg64_low@plt>
mov    %rax,%rdi
call   1040 <read_video_reg64_low@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @Redcloud_fp_reg(i32 %0, i64 %1, i64* nocapture %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i64 @read_video_reg64_low(i64 %1)
store i64 %6, i64* %2
br label %10
7: ; preds = %3
%8 = load i64, i64* %2
%9 = tail call i32 @write_video_reg64_low(i64 %1, i64 %8)
br label %10
10: ; preds = %7, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ JSsetContr(int, int, int);
int /*<<< orphan*/ JSsetFact(double, double);
int /*<<< orphan*/ JSsetSF(int, int, double);
void JSsetParams(int Ftype, int q_id, double mq, double qfac, double mfac) {
  JSsetSF(Ftype, q_id, mq * mq);
  JSsetFact(qfac, mfac);
  JSsetContr(1, 1, 1);
}


x86 assembly (clang, -O0):
<JSsetParams>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1040 <JSsetSF@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1030 <JSsetFact@plt>
mov    $0x1,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1050 <JSsetContr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<JSsetParams>:
sub    $0x18,%rsp
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
mulsd  %xmm0,%xmm0
call   1040 <JSsetSF@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1030 <JSsetFact@plt>
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
add    $0x18,%rsp
jmp    1050 <JSsetContr@plt>

LLVM IR (-O0):
define void @JSsetParams(i32 %0, i32 %1, double %2, double %3, double %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca double
store i32 %0, i32* %6
store i32 %1, i32* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load double, double* %8
%14 = load double, double* %8
%15 = fmul double %13, %14
%16 = call i32 @JSsetSF(i32 %11, i32 %12, double %15)
%17 = load double, double* %9
%18 = load double, double* %10
%19 = call i32 @JSsetFact(double %17, double %18)
%20 = call i32 @JSsetContr(i32 1, i32 1, i32 1)
ret void
}

LLVM IR (-O2):
define void @JSsetParams(i32 %0, i32 %1, double %2, double %3, double %4) {
%6 = fmul double %2, %2
%7 = tail call i32 @JSsetSF(i32 %0, i32 %1, double %6)
%8 = tail call i32 @JSsetFact(double %3, double %4)
%9 = tail call i32 @JSsetContr(i32 1, i32 1, i32 1)
ret void
}
/* Variables and functions */
int doit();
int /*<<< orphan*/ parse_cmdline(int, char **);
int main(int argc, char **argp, char **envp) {
  parse_cmdline(argc, argp);
  return doit();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <parse_cmdline@plt>
mov    $0x0,%al
call   1030 <doit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1040 <parse_cmdline@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <doit@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%8 = load i32, i32* %5
%9 = load i8**, i8*** %6
%10 = call i32 @parse_cmdline(i32 %8, i8** %9)
%11 = call i32 (...) @doit()
ret i32 %11
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1, i8** nocapture readnone %2) {
%4 = tail call i32 @parse_cmdline(i32 %0, i8** %1)
%5 = tail call i32 (...) @doit()
ret i32 %5
}
int gpmScreenHandler_highlightRegion(int left, int right, int top, int bottom) {
  return 0;
}


x86 assembly (clang, -O0):
<gpmScreenHandler_highlightRegion>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @gpmScreenHandler_highlightRegion(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @gpmScreenHandler_highlightRegion(i32 %0, i32 %1, i32 %2, i32 %3) {
ret i32 0
}
/* Type definitions */
struct struct_automata {
  int dummy;
};

/* Variables and functions */
int *__func_in_input(struct struct_automata *, char *, char *);
int *_func_in_input(struct struct_automata *);
int *func_in_input(struct struct_automata *p, char *s) {
  static char input_buf[64];
  return !s ? _func_in_input(p) : __func_in_input(p, s, input_buf);
}


x86 assembly (clang, -O0):
<func_in_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114d <func_in_input+0x2d>
mov    -0x8(%rbp),%rdi
call   1040 <_func_in_input@plt>
mov    %rax,-0x18(%rbp)
jmp    1165 <func_in_input+0x45>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0x2ee4(%rip),%rdx
call   1030 <__func_in_input@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_in_input>:
test   %rsi,%rsi
je     1131 <func_in_input+0x11>
lea    0x2f14(%rip),%rdx
jmp    1030 <__func_in_input@plt>
jmp    1040 <_func_in_input@plt>

LLVM IR (-O0):
%struct.struct_automata = type { i32 }
@func_in_input.input_buf = internal global [64 x i8] zeroinitializer
define i32* @func_in_input(%struct.struct_automata* %0, i8* %1) {
%3 = alloca %struct.struct_automata*
%4 = alloca i8*
store %struct.struct_automata* %0, %struct.struct_automata** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = icmp ne i8* %5, null
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load %struct.struct_automata*, %struct.struct_automata** %3
%9 = call i32* @_func_in_input(%struct.struct_automata* %8)
br label %14
10: ; preds = %2
%11 = load %struct.struct_automata*, %struct.struct_automata** %3
%12 = load i8*, i8** %4
%13 = call i32* @__func_in_input(%struct.struct_automata* %11, i8* %12, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @func_in_input.input_buf, i64 0, i64 0))
br label %14
14: ; preds = %10, %7
%15 = phi i32* [ %9, %7 ], [ %13, %10 ]
ret i32* %15
}

LLVM IR (-O2):
%struct.struct_automata = type { i32 }
@func_in_input.input_buf = internal global [64 x i8] zeroinitializer
define i32* @func_in_input(%struct.struct_automata* %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32* @_func_in_input(%struct.struct_automata* %0)
br label %8
6: ; preds = %2
%7 = tail call i32* @__func_in_input(%struct.struct_automata* %0, i8* %1, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @func_in_input.input_buf, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
%9 = phi i32* [ %5, %4 ], [ %7, %6 ]
ret i32* %9
}
/* Variables and functions */
int /*<<< orphan*/ zfree(int *);
void getKeysFreeResult(int *result) { zfree(result); }


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

x86 assembly (clang, -O2):
<getKeysFreeResult>:
jmp    1030 <zfree@plt>

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

LLVM IR (-O2):
define void @getKeysFreeResult(i32* %0) {
%2 = tail call i32 @zfree(i32* %0)
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int shouldExit(char *line) {
  return line == NULL || strcmp(line, "exit\n") == 0;
}


x86 assembly (clang, -O0):
<shouldExit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1146 <shouldExit+0x36>
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shouldExit>:
test   %rdi,%rdi
je     1132 <shouldExit+0x22>
push   %rax
lea    0xee3(%rip),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"exit\0A\00"
define i32 @shouldExit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %9, label %5
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br label %9
9: ; preds = %5, %1
%10 = phi i1 [ true, %1 ], [ %8, %5 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
@.str = [6 x i8] c"exit\0A\00"
define i32 @shouldExit(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t PowerCtrlSourceGet(void) {
  uint32_t ui32PowerConfig;
  ui32PowerConfig = (*((volatile unsigned long *)(0x40090000 + 0x00000010)));
  if (ui32PowerConfig & 0x00000004) {
    return (0x00000001);
  } else {
    return (0x00000000);
  }
}


x86 assembly (clang, -O0):
<PowerCtrlSourceGet>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40090010,%eax
mov    (%rax),%rax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     112a <PowerCtrlSourceGet+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1131 <PowerCtrlSourceGet+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PowerCtrlSourceGet>:
mov    0x40090010,%rax
40
shr    $0x2,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @PowerCtrlSourceGet() {
%1 = alloca i32
%2 = alloca i32
%3 = load volatile i64, i64* inttoptr (i64 1074331664 to i64*)
%4 = trunc i64 %3 to i32
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = and i32 %5, 4
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %0
store i32 1, i32* %1
br label %10
9: ; preds = %0
store i32 0, i32* %1
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @PowerCtrlSourceGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074331664 to i64*)
%2 = trunc i64 %1 to i32
%3 = lshr i32 %2, 2
%4 = and i32 %3, 1
ret i32 %4
}
void foo793() {}


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

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

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

LLVM IR (-O2):
define void @foo793() {
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int cmp(const void *s1, const void *s2) {
  return strcmp(*(char **)s1, *(char **)s2);
}


x86 assembly (clang, -O0):
<cmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
call   1030 <strcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SN_close_env(struct SN_env *);
extern void italian_UTF_8_close_env(struct SN_env *z) { SN_close_env(z); }


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

x86 assembly (clang, -O2):
<italian_UTF_8_close_env>:
jmp    1030 <SN_close_env@plt>

LLVM IR (-O0):
%struct.SN_env = type { i32 }
define void @italian_UTF_8_close_env(%struct.SN_env* %0) {
%2 = alloca %struct.SN_env*
store %struct.SN_env* %0, %struct.SN_env** %2
%3 = load %struct.SN_env*, %struct.SN_env** %2
%4 = call i32 @SN_close_env(%struct.SN_env* %3)
ret void
}

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define void @italian_UTF_8_close_env(%struct.SN_env* %0) {
%2 = tail call i32 @SN_close_env(%struct.SN_env* %0)
ret void
}
int siint(int x) {
  int a = x;
  return a;
}


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

x86 assembly (clang, -O2):
<siint>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @siint(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t compare_function(const void *a, const void *b) {
  return (*(int *)a - *(int *)b);
}


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

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

LLVM IR (-O0):
define i32 @compare_function(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @compare_function(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ cmus_update_cache(int);
int parse_flags(char const **, char *);
void cmd_update_cache(char *arg) {
  int flag = parse_flags((const char **)&arg, "f");
  cmus_update_cache(flag == 'f');
}


x86 assembly (clang, -O0):
<cmd_update_cache>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1030 <parse_flags@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x66,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <cmus_update_cache@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_update_cache>:
push   %rax
mov    %rdi,(%rsp)
lea    0xed4(%rip),%rsi
mov    %rsp,%rdi
call   1030 <parse_flags@plt>
xor    %edi,%edi
cmp    $0x66,%eax
sete   %dil
call   1040 <cmus_update_cache@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [2 x i8] c"f\00"
define void @cmd_update_cache(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 @parse_flags(i8** %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 102
%7 = zext i1 %6 to i32
%8 = call i32 @cmus_update_cache(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"f\00"
define void @cmd_update_cache(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @parse_flags(i8** %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, 102
%5 = zext i1 %4 to i32
%6 = call i32 @cmus_update_cache(i32 %5)
ret void
}
void foo764(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo764(i32 %0) {
ret void
}
/* Variables and functions */
float min(float, float);
float blendDarken(float base, float blend) { return min(blend, base); }


x86 assembly (clang, -O0):
<blendDarken>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
call   1030 <min@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blendDarken>:
movaps %xmm0,%xmm2
movaps %xmm1,%xmm0
movaps %xmm2,%xmm1
jmp    1030 <min@plt>

LLVM IR (-O0):
define float @blendDarken(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %4
%6 = load float, float* %3
%7 = call float @min(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @blendDarken(float %0, float %1) {
%3 = tail call float @min(float %1, float %0)
ret float %3
}
int f(int i) {
  switch (i) {
  case 2147483647 + 2:
    return 1;
  case 9223372036854775807L * 4:
    return 2;
  case (123456 * 789012) + 1:
    return 3;
  case (2147483647 * 4) / 4:
  case (2147483647 * 4) % 4:
    return 4;
  case 2147483647:
    return 0;
  }
  return (i, 65537) * 65537;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x80000001,%eax
je     1168 <f+0x68>
jmp    111d <f+0x1d>
mov    -0xc(%rbp),%eax
sub    $0xadfc2d01,%eax
je     1180 <f+0x80>
jmp    1130 <f+0x30>
mov    -0xc(%rbp),%eax
sub    $0xfffffffc,%eax
je     1174 <f+0x74>
jmp    1141 <f+0x41>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
sub    $0x2,%eax
jb     118c <f+0x8c>
jmp    1155 <f+0x55>
mov    -0xc(%rbp),%eax
sub    $0x7fffffff,%eax
je     1198 <f+0x98>
jmp    11a4 <f+0xa4>
movl   $0x1,-0x4(%rbp)
jmp    11ab <f+0xab>
movl   $0x2,-0x4(%rbp)
jmp    11ab <f+0xab>
movl   $0x3,-0x4(%rbp)
jmp    11ab <f+0xab>
movl   $0x4,-0x4(%rbp)
jmp    11ab <f+0xab>
movl   $0x0,-0x4(%rbp)
jmp    11ab <f+0xab>
movl   $0x20001,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
cmp    $0xfffffffe,%edi
jg     1120 <f+0x20>
cmp    $0x80000001,%edi
je     1139 <f+0x39>
cmp    $0xadfc2d01,%edi
je     113f <f+0x3f>
cmp    $0xfffffffc,%edi
jne    1145 <f+0x45>
mov    $0x2,%eax
ret
lea    0x1(%rdi),%eax
cmp    $0x2,%eax
jae    112e <f+0x2e>
mov    $0x4,%eax
ret
cmp    $0x7fffffff,%edi
jne    1145 <f+0x45>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret
mov    $0x3,%eax
ret
mov    $0x20001,%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %10 [
i32 -2147483647, label %5
i32 -4, label %6
i32 -1375982335, label %7
i32 -1, label %8
i32 0, label %8
i32 2147483647, label %9
]
5: ; preds = %1
store i32 1, i32* %2
br label %12
6: ; preds = %1
store i32 2, i32* %2
br label %12
7: ; preds = %1
store i32 3, i32* %2
br label %12
8: ; preds = %1, %1
store i32 4, i32* %2
br label %12
9: ; preds = %1
store i32 0, i32* %2
br label %12
10: ; preds = %1
%11 = load i32, i32* %3
store i32 131073, i32* %2
br label %12
12: ; preds = %10, %9, %8, %7, %6, %5
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
switch i32 %0, label %6 [
i32 -2147483647, label %7
i32 -4, label %2
i32 -1375982335, label %3
i32 -1, label %4
i32 0, label %4
i32 2147483647, label %5
]
2: ; preds = %1
br label %7
3: ; preds = %1
br label %7
4: ; preds = %1, %1
br label %7
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %1, %6, %5, %4, %3, %2
%8 = phi i32 [ 131073, %6 ], [ 0, %5 ], [ 4, %4 ], [ 3, %3 ], [ 2, %2 ], [ 1, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ IPPROTO_IP;
int /*<<< orphan*/ IP_HDRINCL;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ perror(char *);
scalar_t__ setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/, void const *,
                      int);
void set_ip_header_included(int fd) {
  const int hdrincl = 1;
  if (setsockopt(fd, IPPROTO_IP, IP_HDRINCL, (const void *)&hdrincl,
                 sizeof(int)) < 0) {
    perror("setsockopt IP_HDRINCL");
    close(fd);
  }
}


x86 assembly (clang, -O0):
<set_ip_header_included>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e94(%rip),%rax
mov    (%rax),%esi
mov    0x2e9b(%rip),%rax
mov    (%rax),%edx
lea    -0x8(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
cmp    $0x0,%rax
jge    1184 <set_ip_header_included+0x54>
lea    0xe89(%rip),%rdi
call   1050 <perror@plt>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_ip_header_included>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
movl   $0x1,0xc(%rsp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%esi
mov    0x2ea1(%rip),%rax
mov    (%rax),%edx
lea    0xc(%rsp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
test   %rax,%rax
js     116c <set_ip_header_included+0x3c>
add    $0x10,%rsp
pop    %rbx
ret
lea    0xe8d(%rip),%rdi
call   1050 <perror@plt>
mov    %ebx,%edi
call   1040 <close@plt>
jmp    1166 <set_ip_header_included+0x36>

LLVM IR (-O0):
@IPPROTO_IP = global i32 0
@IP_HDRINCL = global i32 0
@.str = [22 x i8] c"setsockopt IP_HDRINCL\00"
define void @set_ip_header_included(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* @IPPROTO_IP
%6 = load i32, i32* @IP_HDRINCL
%7 = bitcast i32* %3 to i8*
%8 = call i64 @setsockopt(i32 %4, i32 %5, i32 %6, i8* %7, i32 4)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* %2
%13 = call i32 @close(i32 %12)
br label %14
14: ; preds = %10, %1
ret void
}

LLVM IR (-O2):
@IPPROTO_IP = global i32 0
@IP_HDRINCL = global i32 0
@.str = [22 x i8] c"setsockopt IP_HDRINCL\00"
define void @set_ip_header_included(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%4 = load i32, i32* @IPPROTO_IP
%5 = load i32, i32* @IP_HDRINCL
%6 = call i64 @setsockopt(i32 %0, i32 %4, i32 %5, i8* %3, i32 4)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @close(i32 %0)
br label %11
11: ; preds = %8, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ls_dir(char *);
int main() {
  char *start_path;
  start_path = "/home/";
  ls_dir(start_path);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"/home/\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @ls_dir(i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"/home/\00"
define i32 @main() {
%1 = tail call i32 @ls_dir(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
char ttt(char a, char b, char c) {
  if ((a == b) && (a > 1))
    return (0);
  if ((a == c) && (a > 1))
    return (0);
  if ((c == b) && (c > 1))
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<ttt>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x2(%rbp)
mov    %cl,-0x3(%rbp)
mov    %al,-0x4(%rbp)
movsbl -0x2(%rbp),%eax
movsbl -0x3(%rbp),%ecx
cmp    %ecx,%eax
jne    113b <ttt+0x3b>
movsbl -0x2(%rbp),%eax
cmp    $0x1,%eax
jle    113b <ttt+0x3b>
movb   $0x0,-0x1(%rbp)
jmp    118b <ttt+0x8b>
movsbl -0x2(%rbp),%eax
movsbl -0x4(%rbp),%ecx
cmp    %ecx,%eax
jne    1161 <ttt+0x61>
movsbl -0x2(%rbp),%eax
cmp    $0x1,%eax
jle    1161 <ttt+0x61>
movb   $0x0,-0x1(%rbp)
jmp    118b <ttt+0x8b>
movsbl -0x4(%rbp),%eax
movsbl -0x3(%rbp),%ecx
cmp    %ecx,%eax
jne    1187 <ttt+0x87>
movsbl -0x4(%rbp),%eax
cmp    $0x1,%eax
jle    1187 <ttt+0x87>
movb   $0x0,-0x1(%rbp)
jmp    118b <ttt+0x8b>
movb   $0x1,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ttt>:
cmp    %sil,%dil
setne  %cl
cmp    $0x2,%dil
setl   %r8b
cmp    %dl,%dil
setne  %al
and    %cl,%al
cmp    %sil,%dl
setne  %cl
cmp    $0x2,%dl
setl   %dl
or     %cl,%dl
or     %r8b,%al
and    %dl,%al
ret

LLVM IR (-O0):
define signext i8 @ttt(i8 signext %0, i8 signext %1, i8 signext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i8 %0, i8* %5
store i8 %1, i8* %6
store i8 %2, i8* %7
%8 = load i8, i8* %5
%9 = sext i8 %8 to i32
%10 = load i8, i8* %6
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %9, %11
br i1 %12, label %13, label %18
13: ; preds = %3
%14 = load i8, i8* %5
%15 = sext i8 %14 to i32
%16 = icmp sgt i32 %15, 1
br i1 %16, label %17, label %18
17: ; preds = %13
store i8 0, i8* %4
br label %41
18: ; preds = %13, %3
%19 = load i8, i8* %5
%20 = sext i8 %19 to i32
%21 = load i8, i8* %7
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %20, %22
br i1 %23, label %24, label %29
24: ; preds = %18
%25 = load i8, i8* %5
%26 = sext i8 %25 to i32
%27 = icmp sgt i32 %26, 1
br i1 %27, label %28, label %29
28: ; preds = %24
store i8 0, i8* %4
br label %41
29: ; preds = %24, %18
%30 = load i8, i8* %7
%31 = sext i8 %30 to i32
%32 = load i8, i8* %6
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %31, %33
br i1 %34, label %35, label %40
35: ; preds = %29
%36 = load i8, i8* %7
%37 = sext i8 %36 to i32
%38 = icmp sgt i32 %37, 1
br i1 %38, label %39, label %40
39: ; preds = %35
store i8 0, i8* %4
br label %41
40: ; preds = %35, %29
store i8 1, i8* %4
br label %41
41: ; preds = %40, %39, %28, %17
%42 = load i8, i8* %4
ret i8 %42
}

LLVM IR (-O2):
define signext i8 @ttt(i8 signext %0, i8 signext %1, i8 signext %2) {
%4 = icmp eq i8 %0, %1
%5 = icmp sgt i8 %0, 1
%6 = icmp eq i8 %0, %2
%7 = or i1 %4, %6
%8 = and i1 %5, %7
%9 = icmp ne i8 %2, %1
%10 = icmp slt i8 %2, 2
%11 = or i1 %9, %10
%12 = xor i1 %8, true
%13 = and i1 %11, %12
%14 = zext i1 %13 to i8
ret i8 %14
}
void S_BeginPrecaching(void) {}


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

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

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

LLVM IR (-O2):
define void @S_BeginPrecaching() {
ret void
}
/* Type definitions */
typedef char wint_t;

/* Variables and functions */
int __iswlower_ascii(wint_t c) { return (unsigned int)(c - 'a') < 26u; }


x86 assembly (clang, -O0):
<__iswlower_ascii>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x61,%eax
cmp    $0x1a,%eax
setb   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__iswlower_ascii>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @__iswlower_ascii(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = sub nsw i32 %4, 97
%6 = icmp ult i32 %5, 26
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @__iswlower_ascii(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -97
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
void gdk_window_configure_finished() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_configure_finished() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ modexp();
int /*<<< orphan*/ printDirections();
int /*<<< orphan*/ printLicense();
int main(void) {
  printLicense();
  printDirections();
  modexp();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <printLicense@plt>
mov    $0x0,%al
call   1050 <printDirections@plt>
mov    $0x0,%al
call   1040 <modexp@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @printLicense()
%3 = call i32 (...) @printDirections()
%4 = call i32 (...) @modexp()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @printLicense()
%2 = tail call i32 (...) @printDirections()
%3 = tail call i32 (...) @modexp()
ret i32 0
}
const char *Copy_Brief(void) { return "Copyable"; }


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

x86 assembly (clang, -O2):
<Copy_Brief>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Copyable\00"
define i8* @Copy_Brief() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [9 x i8] c"Copyable\00"
define i8* @Copy_Brief() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int set_seed(int seed) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc(998, &seed, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<set_seed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x3e6,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_seed>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x3e6,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @set_seed(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %3
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc(i32 998, i32* %2, i32* %6, double* %7, i32 0)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @set_seed(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc(i32 998, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
int impar(int num) {
  int r;
  if (num % 2 != 0)
    r = 1;
  else
    r = 0;
  return r;
}


x86 assembly (clang, -O0):
<impar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1127 <impar+0x27>
movl   $0x1,-0x8(%rbp)
jmp    112e <impar+0x2e>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @impar(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = srem i32 %4, 2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %3
br label %9
8: ; preds = %1
store i32 0, i32* %3
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @impar(i32 %0) {
%2 = and i32 %0, 1
ret i32 %2
}