#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 */
struct lcinfo {
  int dummy;
};

/* Variables and functions */
int _set_coll(struct lcinfo const *);
int _set_ctype(struct lcinfo const *);
int _set_mon(struct lcinfo const *);
int _set_num(struct lcinfo const *);
int _set_time(struct lcinfo const *);
int _set_all(const struct lcinfo *info) {
  int result;
  result = _set_coll(info);
  if (!result) {
    goto exit;
  }
  result = _set_ctype(info);
  if (!result) {
    goto exit;
  }
  result = _set_mon(info);
  if (!result) {
    goto exit;
  }
  result = _set_num(info);
  if (!result) {
    goto exit;
  }
  result = _set_time(info);
  if (!result) {
    goto exit;
  }
exit:
  return result;
}


x86 assembly (clang, -O0):
<_set_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <_set_coll@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1177 <_set_all+0x27>
jmp    11e8 <_set_all+0x98>
mov    -0x8(%rbp),%rdi
call   1070 <_set_ctype@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1192 <_set_all+0x42>
jmp    11e8 <_set_all+0x98>
mov    -0x8(%rbp),%rdi
call   1040 <_set_mon@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    11ad <_set_all+0x5d>
jmp    11e8 <_set_all+0x98>
mov    -0x8(%rbp),%rdi
call   1060 <_set_num@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    11c8 <_set_all+0x78>
jmp    11e8 <_set_all+0x98>
mov    -0x8(%rbp),%rdi
call   1030 <_set_time@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    11e3 <_set_all+0x93>
jmp    11e8 <_set_all+0x98>
jmp    11e8 <_set_all+0x98>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_set_all>:
push   %rbx
mov    %rdi,%rbx
call   1050 <_set_coll@plt>
test   %eax,%eax
je     118a <_set_all+0x3a>
mov    %rbx,%rdi
call   1070 <_set_ctype@plt>
test   %eax,%eax
je     118a <_set_all+0x3a>
mov    %rbx,%rdi
call   1040 <_set_mon@plt>
test   %eax,%eax
je     118a <_set_all+0x3a>
mov    %rbx,%rdi
call   1060 <_set_num@plt>
test   %eax,%eax
je     118a <_set_all+0x3a>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <_set_time@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.lcinfo = type { i32 }
define i32 @_set_all(%struct.lcinfo* %0) {
%2 = alloca %struct.lcinfo*
%3 = alloca i32
store %struct.lcinfo* %0, %struct.lcinfo** %2
%4 = load %struct.lcinfo*, %struct.lcinfo** %2
%5 = call i32 @_set_coll(%struct.lcinfo* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %1
br label %34
9: ; preds = %1
%10 = load %struct.lcinfo*, %struct.lcinfo** %2
%11 = call i32 @_set_ctype(%struct.lcinfo* %10)
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = icmp ne i32 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %9
br label %34
15: ; preds = %9
%16 = load %struct.lcinfo*, %struct.lcinfo** %2
%17 = call i32 @_set_mon(%struct.lcinfo* %16)
store i32 %17, i32* %3
%18 = load i32, i32* %3
%19 = icmp ne i32 %18, 0
br i1 %19, label %21, label %20
20: ; preds = %15
br label %34
21: ; preds = %15
%22 = load %struct.lcinfo*, %struct.lcinfo** %2
%23 = call i32 @_set_num(%struct.lcinfo* %22)
store i32 %23, i32* %3
%24 = load i32, i32* %3
%25 = icmp ne i32 %24, 0
br i1 %25, label %27, label %26
26: ; preds = %21
br label %34
27: ; preds = %21
%28 = load %struct.lcinfo*, %struct.lcinfo** %2
%29 = call i32 @_set_time(%struct.lcinfo* %28)
store i32 %29, i32* %3
%30 = load i32, i32* %3
%31 = icmp ne i32 %30, 0
br i1 %31, label %33, label %32
32: ; preds = %27
br label %34
33: ; preds = %27
br label %34
34: ; preds = %33, %32, %26, %20, %14, %8
%35 = load i32, i32* %3
ret i32 %35
}

LLVM IR (-O2):
%struct.lcinfo = type { i32 }
define i32 @_set_all(%struct.lcinfo* %0) {
%2 = tail call i32 @_set_coll(%struct.lcinfo* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1
%5 = tail call i32 @_set_ctype(%struct.lcinfo* %0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %15, label %7
7: ; preds = %4
%8 = tail call i32 @_set_mon(%struct.lcinfo* %0)
%9 = icmp eq i32 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %7
%11 = tail call i32 @_set_num(%struct.lcinfo* %0)
%12 = icmp eq i32 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 @_set_time(%struct.lcinfo* %0)
br label %15
15: ; preds = %13, %10, %7, %4, %1
%16 = phi i32 [ %14, %13 ], [ 0, %10 ], [ 0, %7 ], [ 0, %4 ], [ 0, %1 ]
ret i32 %16
}