#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int);
void baz(int arg1, int arg2, int arg3) {
  printf("Arg1 %x\n", arg1);
  printf("Arg2 %x\n", arg2);
  printf("Arg3 %x\n", arg3);
  if (arg1 != 4 || arg2 != 5 || arg3 != 6)
    exit(1);
}


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x4,-0x4(%rbp)
jne    117c <baz+0x5c>
cmpl   $0x5,-0x8(%rbp)
jne    117c <baz+0x5c>
cmpl   $0x6,-0xc(%rbp)
je     1186 <baz+0x66>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
lea    0xece(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
lea    0xec4(%rip),%rdi
mov    %r14d,%esi
call   1030 <printf@plt>
cmp    $0x4,%ebx
jne    116b <baz+0x4b>
cmp    $0x5,%ebp
jne    116b <baz+0x4b>
cmp    $0x6,%r14d
jne    116b <baz+0x4b>
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"Arg1 %x\0A\00"
@.str.1 = [9 x i8] c"Arg2 %x\0A\00"
@.str.2 = [9 x i8] c"Arg3 %x\0A\00"
define void @baz(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 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %5
%10 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %6
%12 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %4
%14 = icmp ne i32 %13, 4
br i1 %14, label %21, label %15
15: ; preds = %3
%16 = load i32, i32* %5
%17 = icmp ne i32 %16, 5
br i1 %17, label %21, label %18
18: ; preds = %15
%19 = load i32, i32* %6
%20 = icmp ne i32 %19, 6
br i1 %20, label %21, label %23
21: ; preds = %18, %15, %3
%22 = call i32 @exit(i32 1)
unreachable
23: ; preds = %18
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"Arg1 %x\0A\00"
@.str.1 = [9 x i8] c"Arg2 %x\0A\00"
@.str.2 = [9 x i8] c"Arg3 %x\0A\00"
define void @baz(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %2)
%7 = icmp ne i32 %0, 4
%8 = icmp ne i32 %1, 5
%9 = or i1 %7, %8
%10 = icmp ne i32 %2, 6
%11 = or i1 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %3
%13 = tail call i32 @exit(i32 1)
unreachable
14: ; preds = %3
ret void
}